/* Modern Portfolio Theme - Enhanced Design */

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

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0a0b0f;
  color: #e8eaf0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(79, 157, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 157, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #4f9dff, transparent);
  top: -10%;
  right: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #a855ff, transparent);
  bottom: -15%;
  left: -10%;
  animation-delay: 7s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #06b6d4, transparent);
  top: 50%;
  left: 50%;
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Glass card effect */
.glass-card {
  background: rgba(15, 17, 25, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(79, 157, 255, 0.3);
  box-shadow: 0 8px 32px rgba(79, 157, 255, 0.1);
}

/* Layout helpers */
.section {
  padding: 5rem min(8vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.8rem, 2.5vw + 1rem, 2.5rem);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #4f9dff, #a855ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.section-header p {
  color: #a8abb8;
  max-width: 640px;
  font-size: 1.05rem;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem min(8vw, 4rem);
  background: rgba(10, 11, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.brand a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-text {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f9dff, #a855ff);
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0a0b0f;
}

.brand-name {
  font-size: 1.1rem;
  background: linear-gradient(135deg, #e8eaf0, #a8abb8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand .tagline {
  display: block;
  font-size: 0.75rem;
  color: #7a7d8c;
  margin-top: 0.15rem;
  font-weight: 400;
}

.site-nav {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0;
  color: #c4c6d5;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #4f9dff, #a855ff);
  transition: width 0.3s ease-out;
}

.nav-link:hover {
  color: #ffffff;
}

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

/* Active navigation link styling (Suggestion 3.A) */
.nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  width: 100%;
  background: linear-gradient(90deg, #4f9dff, #a855ff);
}

/* Mobile nav button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: #e8eaf0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.fade-in-delay {
  opacity: 0;
  animation: fadeIn 1s ease-out 0.3s forwards;
}

/* Intro / Hero */
.intro {
  padding-top: 4rem;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
}

.intro-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 4rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7a7d8c;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.separator {
  color: #4f9dff;
}

.intro-text h1 {
  font-size: clamp(2.5rem, 4vw + 1rem, 3.8rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff, #a8abb8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  font-size: 1.1rem;
  color: #c4c6d5;
  max-width: 42rem;
  line-height: 1.7;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2.5rem 0 1.5rem;
}

.btn {
  border-radius: 12px;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #4f9dff, #a855ff);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(79, 157, 255, 0.3);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 157, 255, 0.4);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #e8eaf0;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(79, 157, 255, 0.5);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(79, 157, 255, 0.1);
  border: 1px solid rgba(79, 157, 255, 0.2);
  border-radius: 999px;
  font-size: 0.85rem;
  color: #c4c6d5;
}

/* Intro aside */
.intro-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.avatar-frame {
  position: relative;
  border-radius: 24px;
  padding: 0.5rem;
  background: linear-gradient(135deg, rgba(79, 157, 255, 0.3), rgba(168, 85, 255, 0.3));
  overflow: hidden;
}

.avatar-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(79, 157, 255, 0.4), transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.avatar-frame img {
  border-radius: 20px;
  position: relative;
  z-index: 1;
}

.quick-facts {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a7d8c;
  font-weight: 600;
}

.fact-value {
  font-size: 0.95rem;
  color: #e8eaf0;
  font-weight: 500;
}

.fact-company {
  font-size: 0.85rem;
  color: #a8abb8;
}

.intro-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(79, 157, 255, 0.1);
  border: 1px solid rgba(79, 157, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4f9dff;
  font-size: 1.1rem;
  position: relative;
}

.social-link:hover {
  background: rgba(79, 157, 255, 0.2);
  border-color: rgba(79, 157, 255, 0.4);
  transform: translateY(-2px);
}

.social-link[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.8rem;
  background: rgba(10, 11, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.social-link:hover[data-tooltip]::after {
  opacity: 1;
}

/* Narrative section */
.narrative {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.narrative-block {
  padding: 2rem 1.75rem;
  background: rgba(15, 17, 25, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.narrative-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f9dff, #a855ff);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 157, 255, 0.3);
  box-shadow: 0 12px 40px rgba(79, 157, 255, 0.15);
}

.card-hover:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79, 157, 255, 0.2), rgba(168, 85, 255, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #4f9dff;
  margin-bottom: 1rem;
}

.narrative-block h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.narrative-block p {
  font-size: 0.95rem;
  color: #c4c6d5;
  line-height: 1.6;
}

.narrative-block p + p {
  margin-top: 0.75rem;
}

.pill-row {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(79, 157, 255, 0.1);
  border: 1px solid rgba(79, 157, 255, 0.25);
  font-size: 0.8rem;
  color: #a8c5ff;
  font-weight: 500;
}

/* Timeline (experience) */
.experience {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, 
    rgba(79, 157, 255, 0.5) 0%, 
    rgba(168, 85, 255, 0.3) 50%,
    rgba(79, 157, 255, 0.1) 100%
  );
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -3.65rem;
  top: 0.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f9dff, #a855ff);
  border: 3px solid #0a0b0f;
  box-shadow: 0 0 0 3px rgba(79, 157, 255, 0.2);
  z-index: 2;
}

.timeline-content {
  padding: 1.75rem 2rem;
}

.timeline-item header {
  margin-bottom: 1rem;
}

.timeline-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.company {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #a8abb8;
  margin-bottom: 0.25rem;
}

.date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #7a7d8c;
}

.timeline-item ul {
  margin-top: 1rem;
  padding-left: 0;
  list-style: none;
}

.timeline-item li {
  font-size: 0.92rem;
  color: #c4c6d5;
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.timeline-item li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #4f9dff;
  font-weight: bold;
}

/* Skills */
.skills {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.skills-column {
  padding: 2rem 1.75rem;
}

.skill-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 157, 255, 0.2), rgba(168, 85, 255, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #4f9dff;
  margin-bottom: 1rem;
}

.skills-column h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  color: #ffffff;
}

.skills-column h3:first-of-type {
  margin-top: 0;
}

.skills-column ul {
  font-size: 0.9rem;
  color: #c4c6d5;
  padding-left: 0;
  list-style: none;
}

.skills-column li {
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skills-column li i {
  color: #4f9dff;
  font-size: 0.85rem;
}

/* Education */
.education {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.edu-block {
  padding: 2rem 1.75rem;
  transition: all 0.3s ease;
}

.edu-block:hover {
  transform: translateY(-3px);
}

.edu-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(168, 85, 255, 0.2), rgba(79, 157, 255, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #a855ff;
  margin-bottom: 1rem;
}

.edu-block h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.degree {
  font-size: 0.95rem;
  color: #a8abb8;
  margin-bottom: 0.5rem;
}

.school {
  font-size: 0.9rem;
  color: #7a7d8c;
}

/* Certifications */
.certification {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.cert-card {
  padding: 2rem 1.75rem;
  transition: all 0.3s ease;
  text-align: center;
}

.cert-card:hover {
  transform: translateY(-3px);
}

.cert-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f9dff, #a855ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #ffffff;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 24px rgba(79, 157, 255, 0.3);
}

.cert-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.cert-issuer {
  font-size: 0.9rem;
  color: #4f9dff;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cert-desc {
  font-size: 0.88rem;
  color: #a8abb8;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.cert-license {
  font-size: 0.8rem;
  color: #7a7d8c;
  font-family: 'Courier New', monospace;
}

/* Contact */
.contact {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 2rem;
  align-items: flex-start;
}

.contact-details {
  padding: 2rem 1.75rem;
}

.contact-details h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item i {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(79, 157, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #4f9dff;
  flex-shrink: 0;
}

.contact-item div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a7d8c;
  font-weight: 600;
}

.contact-value {
  font-size: 0.95rem;
  color: #e8eaf0;
}

.contact-value:hover {
  color: #4f9dff;
}

.contact-form {
  padding: 2.5rem 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #a8abb8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 11, 15, 0.6);
  color: #e8eaf0;
  font-size: 0.95rem;
  padding: 0.85rem 1.1rem;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #4f9dff;
  box-shadow: 0 0 0 3px rgba(79, 157, 255, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #7a7d8c;
}

.contact-form .btn {
  margin-top: 0.5rem;
  width: 100%;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #a8abb8;
  text-align: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem min(8vw, 4rem);
  background: rgba(10, 11, 15, 0.8);
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #7a7d8c;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(79, 157, 255, 0.1);
  border: 1px solid rgba(79, 157, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4f9dff;
  font-size: 0.95rem;
}

.footer-links a:hover {
  background: rgba(79, 157, 255, 0.2);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 980px) {
  .intro-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }

  .intro-aside {
    order: -1;
    max-width: 400px;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-marker {
    left: -2.65rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 1.5rem;
  }

  .site-header {
    padding: 1rem 1.5rem;
  }

  .site-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    padding: 1rem 1.5rem;
    background: rgba(10, 11, 15, 0.98);
    backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .intro {
    padding-top: 2rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .narrative-grid,
  .skills-columns,
  .edu-grid,
  .cert-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}