/* ============================================
   PREMIUM PORTFOLIO - SPACE THEME
   Top 1% Developer Aesthetic
   ============================================ */

:root {
  /* Color Palette */
  --bg: #0a0e27;
  --bg-secondary: #0f1535;
  --text: #e4e8f0;
  --text-secondary: #a0abb6;
  --text-muted: #6b7280;
  --accent: #00d4ff;
  --accent-secondary: #00f7ff;
  --accent-glow: rgba(0, 212, 255, 0.3);

  /* Glass Effect */
  --glass-bg: rgba(15, 21, 53, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 20px;

  /* Spacing */
  --max-width: 1200px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Typography */
  --font-sans: 'Segoe UI', -apple-system, system-ui, 'Helvetica Neue', sans-serif;
  --font-mono: 'Courier New', monospace;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease-out;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Canvas for stars */
#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* Main content above canvas */
main {
  position: relative;
  z-index: 1;
  margin-top: 70px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-md);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--spacing-md);
}

.ruthie-regular {
  font-family: "Ruthie", cursive;
  font-weight: 400;
  font-style: normal;
}

.cursive-name {
  font-family: "Ruthie", cursive;
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(90deg,
      rgba(0, 212, 255, 0.4) 0%,
      rgba(0, 212, 255, 0.6) 25%,
      rgba(0, 247, 255, 0.8) 50%,
      rgba(0, 212, 255, 0.6) 75%,
      rgba(0, 212, 255, 0.4) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
  animation: handwriteAnimation 2.5s ease-in-out 0.5s forwards;
  clip-path: inset(0 100% 0 0);
}

@keyframes handwriteAnimation {
  0% {
    clip-path: inset(0 100% 0 0);
  }

  100% {
    clip-path: inset(0 0 0 0);
  }
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--spacing-sm);
}

p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-sm) 0;
  max-width: 65ch;
}

.lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text);
  line-height: 1.8;
  margin-bottom: var(--spacing-lg);
}

/* Text Effects */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {

  0%,
  100% {
    filter: hue-rotate(0deg);
  }

  50% {
    filter: hue-rotate(10deg);
  }
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 39, 0.6);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-md);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition-base);
}

.logo:hover {
  color: var(--accent-secondary);
}

.nav {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-base);
}

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

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 1rem;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.2);
}

/* ============================================
   GLASS CARDS
   ============================================ */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-base);
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.glass-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15);
  transform: translateY(-4px);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.ctas {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.tech-stack {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.tech-badge {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 20px;
  color: var(--accent);
  font-weight: 500;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tech Illustration Container */
.tech-illustration {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Laptop SVG Styling */
.laptop-svg {
  width: 420px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3)) drop-shadow(0 0 40px rgba(0, 212, 255, 0.2));
  animation: floatLaptop 6s ease-in-out infinite;
}

/* Laptop Float Animation */
@keyframes floatLaptop {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

/* ============================================
   FLOATING ICONS
   ============================================ */

.floating-icon {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.7;
  animation: float 4s ease-in-out infinite;
  z-index: 1;
}

.icon-code {
  top: -20px;
  right: -10px;
  animation-delay: 0s;
}

.icon-star {
  top: 40px;
  right: -30px;
  animation-delay: 1s;
  font-size: 2rem;
}

.icon-rocket {
  top: 60px;
  right: -20px;
  animation-delay: 0.5s;
  font-size: 2rem;
}

.icon-mail {
  top: 50px;
  right: -40px;
  animation-delay: 1.5s;
  font-size: 2rem;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  position: relative;
}

.section-header {
  position: relative;
  margin-bottom: var(--spacing-xl);
}

.section-header h2 {
  position: relative;
  z-index: 2;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-card {
  display: grid;
  grid-template-columns: 1fr 0.5fr;
  gap: 2rem;
  align-items: center;
}

.about-content {
  position: relative;
  z-index: 2;
}

.about-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 247, 255, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base);
}

.about-photo:hover .photo-image {
  transform: scale(1.05);
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */

.experience-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  overflow-y: visible;
  margin-top: var(--spacing-xl);
  padding: 0.5rem 0 1rem 0;
  scroll-behavior: smooth;
}

.experience-scroll::-webkit-scrollbar {
  height: 6px;
}

.experience-scroll::-webkit-scrollbar-track {
  background: rgba(0, 212, 255, 0.05);
  border-radius: 10px;
}

.experience-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 10px;
}

.experience-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

.experience-card {
  display: flex;
  flex-direction: column;
  position: relative;
  flex: 0 0 calc(50% - 1rem);
  min-width: 380px;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: var(--spacing-md);
}

.experience-header h3 {
  margin: 0;
  flex: 1;
}

.experience-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 12px;
}

.experience-company {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.experience-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}

.experience-duration {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 var(--spacing-md) 0;
}

.experience-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.experience-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  padding-left: 1.5rem;
  position: relative;
}

.experience-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* ============================================
   PROJECTS GRID
   ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: var(--spacing-xl);
}

.glass-card .card-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  display: inline-block;
  color: var(--accent);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--spacing-md) 0;
}

.project-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: var(--spacing-md);
}

.project-links .link {
  display: block;
  width: fit-content;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 4px;
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color var(--transition-base);
}

.link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.link:hover {
  color: var(--accent-secondary);
}

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

/* ============================================
   CONTACT FORM
   ============================================ */

.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-submit {
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-md);
}

label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

input,
textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  color: var(--text-secondary);
  font-size: 0.95rem;
  min-height: 1.5rem;
}

/* Contact Information Cards */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: rgba(0, 212, 255, 0.03);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.contact-item:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 2.5rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-details {
  flex: 1;
}

.contact-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  transition: color var(--transition-base);
  word-break: break-all;
}

.contact-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
  background: rgba(10, 14, 39, 0.5);
  backdrop-filter: blur(10px);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

.footer-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: var(--spacing-lg);
}

.social-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
  font-size: 0.95rem;
  font-weight: 500;
}

.social-links a:hover {
  color: var(--accent);
}

/* Heart Icon Hover Effect */
.heart-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0 2px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300d4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: all var(--transition-base);
}

.heart-icon:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%2300d4ff' stroke='%2300d4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E");
  filter: drop-shadow(0 0 8px var(--accent-glow)) drop-shadow(0 0 12px var(--accent-glow));
  transform: scale(1.2);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

.reveal-stagger {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

.reveal-stagger:nth-child(1) {
  animation: revealUp var(--transition-slow) ease-out forwards;
  animation-delay: 0s;
}

.reveal-stagger:nth-child(2) {
  animation: revealUp var(--transition-slow) ease-out forwards;
  animation-delay: 0.1s;
}

.reveal-stagger:nth-child(3) {
  animation: revealUp var(--transition-slow) ease-out forwards;
  animation-delay: 0.2s;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

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

  .hero-visual {
    display: flex;
    justify-content: center;
  }

  .glass-orb {
    width: 220px;
    height: 220px;
  }

  .experience-card {
    flex: 0 0 calc(100% - 1rem);
    min-width: 300px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 1rem;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    min-width: 200px;
    gap: var(--spacing-md);
    z-index: 31;
  }

  .nav.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .ctas {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .floating-icon {
    display: none;
  }

  .hero-visual {
    display: none;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .glass-card {
    padding: var(--spacing-md);
  }

  .about-card {
    grid-template-columns: 1fr;
  }

  .about-photo {
    height: 280px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
  }

  .contact-form {
    gap: var(--spacing-md);
  }

  .form-submit {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .social-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}