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

:root {
  color-scheme: dark;
  --bg: #05060b;
  --bg-soft: #0b0f1a;
  --glass: rgba(15, 20, 35, 0.78);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #f8f8fb;
  --muted: #b3b8c5;
  --accent: #7c6bff;
  --accent-2: #27e7ff;
  --accent-3: #f6b66f;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -50%;
  background: radial-gradient(circle at 20% 20%, rgba(124, 107, 255, 0.12), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(39, 231, 255, 0.12), transparent 30%),
    radial-gradient(circle at 50% 80%, rgba(246, 182, 111, 0.1), transparent 40%);
  animation: gradientShift 18s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 1;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.7;
  mix-blend-mode: screen;
  animation: float 18s ease-in-out infinite;
}

.orb--one {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, #7c6bff 0%, transparent 70%);
}

.orb--two {
  width: 520px;
  height: 520px;
  top: 15%;
  right: -160px;
  background: radial-gradient(circle, #27e7ff 0%, transparent 70%);
  animation-delay: -6s;
}

.orb--three {
  width: 480px;
  height: 480px;
  bottom: -160px;
  left: 10%;
  background: radial-gradient(circle, #f6b66f 0%, transparent 70%);
  animation-delay: -9s;
}

.orb--four {
  width: 360px;
  height: 360px;
  bottom: 10%;
  right: 12%;
  background: radial-gradient(circle, #7df9ff 0%, transparent 70%);
  animation-delay: -4s;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(40px, -40px, 0) scale(1.08);
  }
}

.hero {
  position: relative;
  padding: 28px 6vw 120px;
  min-height: 100vh;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.hero--clean {
  gap: 48px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 18px;
  z-index: 5;
  backdrop-filter: blur(8px);
  background: rgba(5, 6, 11, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 10px 20px;
  animation: navIn 0.8s ease both;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s ease;
  cursor: pointer;
  position: relative;
}

.logo::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.2), rgba(39, 231, 255, 0.2));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.logo:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 0 25px rgba(124, 107, 255, 0.4),
              0 0 40px rgba(39, 231, 255, 0.2);
  border-color: rgba(124, 107, 255, 0.3);
}

.logo:hover::before {
  opacity: 1;
}

.logo:active {
  transform: scale(1.05) rotate(0deg);
}

.logo-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: filter 0.4s ease;
}

.logo:hover .logo-icon {
  filter: brightness(1.1);
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--accent-2);
  transition: width 0.2s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  border: none;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(240px, 0.9fr);
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.6rem, 4vw, 4.6rem);
  letter-spacing: 0.2px;
  margin-bottom: 20px;
}

.hero-copy h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: textShimmer 6s ease infinite;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.72rem;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.subhead {
  color: var(--muted);
  max-width: 560px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.primary-btn,
.ghost-btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.primary-btn {
  background: linear-gradient(120deg, rgba(124, 107, 255, 0.85), rgba(39, 231, 255, 0.85));
  color: #05060b;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 24, 0.5);
}

.primary-btn:hover,
.ghost-btn:hover,
.nav-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.hero--clean .primary-btn:hover,
.hero--clean .ghost-btn:hover,
.hero--clean .nav-cta:hover {
  box-shadow: none;
}

.hero-card {
  position: relative;
  padding: 32px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.hero-card--photo {
  backdrop-filter: blur(18px);
}

.hero-card__glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(124, 107, 255, 0.18), transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

.hero-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-card--modern {
  background: rgba(7, 9, 16, 0.55);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4);
  overflow: visible;
}

.portrait-shell {
  position: relative;
  display: grid;
  gap: 18px;
  align-items: center;
  justify-items: center;
}

.portrait-orbit {
  position: absolute;
  width: min(260px, 76vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(124, 107, 255, 0.3);
  box-shadow: 0 0 50px rgba(124, 107, 255, 0.2);
  animation: orbit 16s linear infinite;
}

.portrait-orbit::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(39, 231, 255, 0.25);
  opacity: 0.6;
}

.portrait-core {
  position: relative;
  width: min(210px, 64vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 10, 16, 0.75);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.4);
}

.portrait-core::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(124, 107, 255, 0.25), transparent 60%);
  opacity: 0.8;
}

.portrait-core::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 11, 0) 55%, rgba(5, 6, 11, 0.3) 100%);
  pointer-events: none;
}

.portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  filter: brightness(1.12) saturate(1.06) contrast(0.98);
}

.portrait-chipset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.portrait-chipset span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 24, 0.7);
  backdrop-filter: blur(6px);
}

.hero-card__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.hero-card__stats span {
  font-size: 1.5rem;
  font-weight: 600;
}

.hero-card__stats p {
  font-size: 0.85rem;
  color: var(--muted);
}

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

.scroll-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.scroll-indicator span {
  width: 38px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  position: relative;
}

.scroll-indicator span::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  animation: scroll 1.6s ease-in-out infinite;
}

@keyframes scroll {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 24px);
  }
}

.section {
  position: relative;
  padding: 120px 6vw;
  z-index: 2;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.awards {
  z-index: 3;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
  opacity: 0.4;
}

.section-header {
  max-width: 720px;
  margin-bottom: 48px;
}

.hero-copy,
.hero-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 16px;
}

.section-header p {
  color: var(--muted);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 24px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 20px;
}

.leadership-grid,
.extras-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 24px;
}

.skill-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(10, 14, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-card h3 {
  margin-bottom: 10px;
}

.skill-card p {
  color: var(--muted);
}

.experience-card,
.project-card,
.awards-grid article {
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(14, 18, 30, 0.92), rgba(8, 12, 20, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, border 0.3s ease;
  transform-style: preserve-3d;
}

.experience-card,
.project-card,
.awards-grid article {
  animation: floatSoft 10s ease-in-out infinite;
}

.experience-card:nth-child(2) {
  animation-delay: -2s;
}

.project-card:nth-child(2) {
  animation-delay: -3s;
}

.project-card:nth-child(3) {
  animation-delay: -5s;
}

.experience-card:hover,
.project-card:hover,
.awards-grid article:hover {
  transform: translateY(-8px);
  border-color: rgba(124, 107, 255, 0.35);
}

.experience-card h3 {
  margin-bottom: 8px;
}

.meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.experience-card ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.experience-card li::before {
  content: "✦";
  color: var(--accent-2);
  margin-right: 8px;
}

.stack {
  font-size: 0.85rem;
  color: var(--accent-3);
  margin-top: 12px;
}

.timeline-shell {
  position: relative;
  display: grid;
  gap: 28px;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}

.timeline-list {
  display: grid;
  gap: 18px;
}

.timeline-item {
  position: relative;
  padding: 20px 24px 20px 64px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, rgba(12, 16, 28, 0.95), rgba(8, 12, 20, 0.85));
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease;
  transform-style: preserve-3d;
}

.timeline-item:hover {
  transform: translateX(6px);
  border-color: rgba(39, 231, 255, 0.4);
}

.timeline-item::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-2);
  left: 14px;
  top: 28px;
  box-shadow: 0 0 0 6px rgba(39, 231, 255, 0.12);
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-item p {
  color: var(--muted);
}

.timeline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.timeline-item.active {
  border-color: rgba(124, 107, 255, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  animation: glowPulse 2.8s ease-in-out infinite;
}

.timeline-detail {
  margin-top: 14px;
  display: none;
  gap: 12px;
}

.timeline-item.active .timeline-detail {
  display: grid;
}

.timeline-detail ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.timeline-detail li::before {
  content: "•";
  color: var(--accent);
  margin-right: 8px;
}

.project-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.awards-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  position: relative;
  z-index: 2;
  width: 100%;
}

@media (max-width: 700px) {
  .awards-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

.award-card {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.card-links a {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 14, 24, 0.45);
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.card-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 107, 255, 0.4);
  background: rgba(10, 14, 24, 0.7);
}

.award-thumb {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.25), rgba(39, 231, 255, 0.2));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.award-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 45%);
  mix-blend-mode: screen;
}

.award-thumb.has-image::before,
.award-thumb.has-image::after {
  display: none;
}

.award-thumb.has-image {
  background-color: rgba(8, 12, 20, 0.6);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.award-thumb::before {
  content: "";
  position: absolute;
  inset: -60% -20%;
  background: conic-gradient(from 180deg, rgba(124, 107, 255, 0.2), transparent 40%, rgba(39, 231, 255, 0.18), transparent 75%);
  animation: spinGlow 12s linear infinite;
  opacity: 0.8;
}

.project-card::after,
.experience-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(124, 107, 255, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.hero-card--photo.hero-card--clean {
  perspective: 900px;
}

.photo-card__media {
  animation: haloFloat 10s ease-in-out infinite;
}

/* .award-card:nth-child(2) .award-thumb {
  background: linear-gradient(135deg, rgba(246, 182, 111, 0.25), rgba(124, 107, 255, 0.18));
}

.award-card:nth-child(3) .award-thumb {
  background: linear-gradient(135deg, rgba(39, 231, 255, 0.25), rgba(125, 249, 255, 0.2));
}

.award-card:nth-child(4) .award-thumb {
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.22), rgba(246, 182, 111, 0.2));
} */

.contact-card {
  display: grid;
  gap: 32px;
  padding: 40px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.2), rgba(39, 231, 255, 0.15));
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.contact-card--elegant {
  background: linear-gradient(135deg, rgba(12, 16, 28, 0.92), rgba(8, 12, 20, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.contact-card--elegant::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(124, 107, 255, 0.18), transparent 65%);
  opacity: 0.6;
  pointer-events: none;
}

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

.contact-actions {
  display: grid;
  gap: 12px;
}

.contact-actions a {
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(8, 12, 20, 0.75);
  border: 1px solid var(--stroke);
  transition: transform 0.2s ease, border 0.2s ease;
}

.contact-actions a:hover {
  transform: translateX(4px);
  border-color: rgba(39, 231, 255, 0.4);
}

.contact-actions--elegant a {
  background: rgba(10, 14, 24, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

.footer {
  padding: 30px 6vw 50px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 24, 0.8);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 20;
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-4px);
}

@keyframes shimmer {
  0% {
    transform: translateX(-120%);
  }
  60% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}

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

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

@keyframes gradientShift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(8%, -6%, 0);
  }
}

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

@keyframes navIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  }
  50% {
    box-shadow: 0 30px 60px rgba(124, 107, 255, 0.35);
  }
}

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

@keyframes haloFloat {
  0%,
  100% {
    transform: translateZ(0);
  }
  50% {
    transform: translateZ(24px);
  }
}

@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-card--clean {
    max-width: 420px;
  }

  .experience-grid,
  .skills-grid,
  .leadership-grid,
  .extras-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .timeline-line {
    left: 12px;
  }

  .timeline-item {
    padding-left: 48px;
  }

  .hero {
    padding-top: 24px;
  }

  .nav {
    position: static;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    font-size: 0.8rem;
    gap: 12px;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
  }

  .hero-content {
    gap: 28px;
  }

  .hero-copy {
    order: 2;
  }

  .hero-card {
    order: 1;
  }

  .hero-copy h1 {
    font-size: clamp(2.1rem, 8vw, 3rem);
  }

  .subhead {
    font-size: 1.02rem;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
    text-align: center;
  }

  .portrait-core {
    width: min(200px, 80vw);
  }

  .section {
    padding: 90px 6vw;
  }

  .experience-grid,
  .project-grid,
  .awards-grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  
  .award-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  
  .section.awards {
    overflow: visible !important;
  }

  .contact-card {
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 20px 5vw 90px;
  }

  .nav {
    padding: 10px 14px;
  }

  .logo {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .nav-links {
    gap: 8px;
    font-size: 0.75rem;
  }

  .nav-links a {
    flex: 1 1 40%;
    text-align: center;
  }

  .hero-card--clean {
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }

  .eyebrow {
    letter-spacing: 1px;
  }

  .portrait-core {
    width: min(180px, 84vw);
  }

  .portrait-orbit {
    width: min(210px, 90vw);
  }

  .scroll-indicator {
    display: none;
  }

  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .awards-grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .award-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .section.awards {
    overflow: visible;
  }
}

/* Floating animated elements */
.floating-elements {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.floating-element {
  position: absolute;
  font-size: 1.2rem;
  color: rgba(124, 107, 255, 0.4);
  font-weight: 600;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(124, 107, 255, 0.3);
  user-select: none;
  opacity: 0;
}

.floating-element.code-bracket {
  color: rgba(39, 231, 255, 0.5);
  text-shadow: 0 0 12px rgba(39, 231, 255, 0.4);
}

.floating-element.binary {
  color: rgba(246, 182, 111, 0.4);
  text-shadow: 0 0 10px rgba(246, 182, 111, 0.3);
  font-size: 1rem;
}

.floating-element.terminal {
  color: rgba(124, 107, 255, 0.5);
  text-shadow: 0 0 12px rgba(124, 107, 255, 0.4);
}

.floating-element.circuit {
  color: rgba(39, 231, 255, 0.4);
  text-shadow: 0 0 10px rgba(39, 231, 255, 0.3);
  font-size: 1.4rem;
}

.floating-element.arrow {
  color: rgba(124, 107, 255, 0.6);
  text-shadow: 0 0 15px rgba(124, 107, 255, 0.5);
  font-size: 1.5rem;
}

/* Terminal Window */
.terminal-window {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 500px;
  max-width: calc(100vw - 80px);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(8, 10, 20, 0.98), rgba(5, 7, 15, 0.98));
  border: 1px solid rgba(124, 107, 255, 0.4);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6),
              0 0 50px rgba(124, 107, 255, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 9999;
  opacity: 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  overflow: hidden;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
  pointer-events: auto;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease, height 0.3s ease;
  will-change: opacity, transform;
  user-select: none;
}

.terminal-window:has(.terminal-input:focus) {
  border-color: rgba(124, 107, 255, 0.6);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6),
              0 0 60px rgba(124, 107, 255, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.terminal-window.terminal-minimized {
  height: auto;
  min-height: auto;
}

.terminal-window.terminal-minimized .terminal-body {
  display: none !important;
}

.terminal-window.terminal-maximized {
  width: 90vw !important;
  height: 80vh !important;
  max-width: 90vw !important;
  border-radius: 20px;
}

.terminal-window.terminal-closed {
  display: none;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(15, 18, 30, 0.95), rgba(10, 14, 24, 0.9));
  border-bottom: 1px solid rgba(124, 107, 255, 0.2);
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  cursor: move;
  user-select: none;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.terminal-btn {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.terminal-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.terminal-btn--close {
  background: linear-gradient(135deg, #ff5f56, #ff3b30);
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
}

.terminal-btn--close:hover {
  background: linear-gradient(135deg, #ff5f56, #ff3b30);
  opacity: 0.4;
}

.terminal-btn--minimize {
  background: linear-gradient(135deg, #ffbd2e, #ff9500);
}

.terminal-btn--minimize:hover {
  background: linear-gradient(135deg, #ff9500, #ff7f00);
}

.terminal-btn--maximize {
  background: linear-gradient(135deg, #27c93f, #1db954);
}

.terminal-btn--maximize:hover {
  background: linear-gradient(135deg, #1db954, #1ed760);
}

.terminal-title {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: lowercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  cursor: move;
  user-select: none;
}

.terminal-body {
  padding: 18px 20px;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
  background: rgba(5, 6, 11, 0.3);
  transition: display 0.3s ease;
  display: flex;
  flex-direction: column;
}

.terminal-window.terminal-maximized .terminal-body {
  max-height: calc(80vh - 60px);
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 8px;
}

.terminal-body::-webkit-scrollbar {
  width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(124, 107, 255, 0.4);
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 107, 255, 0.6);
}

.terminal-line {
  display: flex;
  align-items: center;
  margin-top: 12px;
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.terminal-prompt {
  color: var(--accent-2);
  margin-right: 10px;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(39, 231, 255, 0.4);
  flex-shrink: 0;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e8e8e8;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0;
  margin: 0;
  min-width: 0;
  width: 100%;
  caret-color: var(--accent-2);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.terminal-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.terminal-command {
  color: #e8e8e8;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
  font-weight: 400;
}

.terminal-cursor {
  display: inline-block;
  width: 2px;
  height: 18px;
  background: var(--accent-2);
  margin-left: 4px;
  animation: blink 1s infinite;
  box-shadow: 0 0 6px rgba(39, 231, 255, 0.6);
  border-radius: 1px;
  flex-shrink: 0;
  pointer-events: none;
}

.terminal-input:focus + .terminal-cursor {
  display: none;
}

.terminal-input:not(:focus) + .terminal-cursor {
  animation: blink 1s infinite;
  display: inline-block;
}

.terminal-output {
  color: #a8b3c0;
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal-output-line {
  margin-bottom: 6px;
  opacity: 0;
  word-break: break-word;
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  color: #a8b3c0;
}

.terminal-output-line .terminal-prompt {
  margin-right: 10px;
  flex-shrink: 0;
  color: var(--accent-2);
  text-shadow: 0 0 6px rgba(39, 231, 255, 0.4);
}

.terminal-output-line.success {
  color: #4ade80;
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.terminal-output-line.error {
  color: #f87171;
  text-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}

.terminal-output-line.info {
  color: #60a5fa;
  text-shadow: 0 0 6px rgba(96, 165, 250, 0.4);
}

.terminal-output-line.warning {
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .terminal-window {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .terminal-window {
    display: none !important;
  }
  
  .terminal-body {
    min-height: 150px;
    max-height: 200px;
  }
}
