/* ===========================
   CSS Variables & Root Styles
   =========================== */
:root {
  /* Colors - Dark mode friendly structure */
  --color-bg: #0a0a0a;
  --color-text: #f5f5f5;
  --color-text-secondary: #a0a0a0;
  --color-accent: #ffffff;
  --color-hero-accent: #2fd5cf;
  --color-border: #2a2a2a;
  --color-input-bg: #151515;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  /* Custom cursor */
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"><circle cx="12" cy="12" r="4"/></svg>') 12 12, auto;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/></svg>");
  background-size: 220px 220px;
  opacity: 0.06;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
}

a, button {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none" stroke="white" stroke-width="2"><circle cx="16" cy="16" r="6"/><circle cx="16" cy="16" r="2" fill="white"/></svg>') 16 16, pointer;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.3;
}

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-text-secondary);
}

/* ===========================
   Layout & Container
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section-divider {
  height: 1px;
  width: min(820px, 80%);
  margin: 0 auto;
  background: linear-gradient(90deg, rgba(47, 213, 207, 0), rgba(47, 213, 207, 0.35), rgba(47, 213, 207, 0));
  opacity: 0;
  transition: var(--transition-slow);
}


.section-divider.visible {
  opacity: 0.7;
}

body > section,
body > footer {
  position: relative;
  z-index: 1;
}

.parallax {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.parallax-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(47, 213, 207, 0.28), rgba(47, 213, 207, 0) 70%);
  opacity: 0.35;
  filter: blur(2px);
  will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: orbDrift 18s ease-in-out infinite;
}

.parallax-orb.orb-1 {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -120px;
  animation-duration: 22s;
}

.parallax-orb.orb-2 {
  width: 680px;
  height: 680px;
  top: 10%;
  right: -240px;
  background: radial-gradient(circle at 70% 30%, rgba(245, 245, 245, 0.16), rgba(47, 213, 207, 0) 70%);
  opacity: 0.25;
  animation-duration: 26s;
  animation-delay: -6s;
}

.parallax-orb.orb-3 {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: 8%;
  opacity: 0.32;
  animation-duration: 20s;
  animation-delay: -10s;
}

.parallax-orb.orb-4 {
  width: 560px;
  height: 560px;
  bottom: -240px;
  right: 6%;
  opacity: 0.22;
  animation-duration: 28s;
  animation-delay: -14s;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  justify-content: center;
  text-align: center;
  overflow: hidden;
}


.hero-content {
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: var(--spacing-sm);
  color: var(--color-accent);
}

.hero-name {
  display: inline-block;
  background: linear-gradient(120deg, #ffffff 20%, var(--color-hero-accent) 55%, #ffffff 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(47, 213, 207, 0.25);
  animation: nameShimmer 10s ease-in-out infinite;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
  min-height: 2.5rem;
}

/* Typing cursor animation */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--color-accent);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

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


.scroll-indicator {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease-out 1.5s forwards, bounce 2s ease-in-out 2s infinite;
  z-index: 1;
}

.scroll-indicator::after {
  content: '↓';
  font-size: 1.5rem;
  color: var(--color-text-secondary);
}

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

/* ===========================
  About Section
  =========================== */

.about::before,
.about::after,
.skills::before,
.skills::after,
.contact::before,
.contact::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 213, 207, 0.12) 0%, rgba(10, 10, 10, 0) 70%);
  filter: blur(18px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.about::before {
  top: -160px;
  right: -140px;
}

.about::after {
  bottom: -200px;
  left: -160px;
  width: 360px;
  height: 360px;
  opacity: 0.35;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.about h2 {
  margin-bottom: var(--spacing-md);
  color: var(--color-accent);
  display: inline-block;
  position: relative;
}

.about h2::after,
.skills h2::after,
.contact h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(47, 213, 207, 0.9), rgba(47, 213, 207, 0));
  transform: scaleX(0.2);
  transform-origin: left;
  opacity: 0.4;
  transition: var(--transition-smooth);
}

.about h2:hover::after,
.skills h2:hover::after,
.contact h2:hover::after {
  transform: scaleX(1);
  opacity: 0.9;
}

.about h2:hover,
.skills h2:hover,
.contact h2:hover {
  text-shadow: 0 0 18px rgba(47, 213, 207, 0.22);
}

.about p {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.about p:last-child {
  margin-bottom: 0;
}

/* ===========================
  Skills Section
  =========================== */

.skills::before {
  top: -140px;
  left: -140px;
}

.skills::after {
  bottom: -220px;
  right: -160px;
  width: 380px;
  height: 380px;
  opacity: 0.35;
}

.skills h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  color: var(--color-accent);
  display: inline-block;
  position: relative;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.skill-card {
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--spacing-md);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}


.skill-card:hover {
  border-color: var(--color-hero-accent);
  transform: translateY(-6px) rotateX(1.5deg) rotateY(-1.5deg);
  box-shadow: 0 0 0 1px rgba(47, 213, 207, 0.4), 0 12px 28px rgba(0, 0, 0, 0.3);
}

.skill-card h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--color-accent);
  font-size: 1.25rem;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  padding: var(--spacing-xs) 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.2rem;
}

.skill-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--color-hero-accent);
  font-size: 0.75rem;
  top: 0.45em;
}

/* ===========================
  Contact Section
  =========================== */

.contact::before {
  top: -180px;
  right: -140px;
}

.contact::after {
  bottom: -220px;
  left: -160px;
  width: 360px;
  height: 360px;
  opacity: 0.35;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.contact h2 {
  text-align: center;
  margin-bottom: var(--spacing-md);
  color: var(--color-accent);
  display: inline-block;
  position: relative;
}

.contact-intro {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  font-size: 1.125rem;
}

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

.form-status {
  min-height: 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-top: var(--spacing-xs);
}

.form-status[data-type="success"] {
  color: #86efac;
}

.form-status[data-type="error"] {
  color: #fca5a5;
}

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

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--spacing-sm);
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--color-text);
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(47, 213, 207, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  border-radius: 8px;
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  margin-top: var(--spacing-sm);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(47, 213, 207, 0.18);
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none" stroke="black" stroke-width="2"><circle cx="16" cy="16" r="6"/><circle cx="16" cy="16" r="2" fill="black"/></svg>') 16 16, pointer;
}

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

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  padding: var(--spacing-md);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--color-border);
}

/* ===========================
   Scroll Animations
   =========================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes orbDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(22px, -18px, 0) scale(1.03);
  }
}

/* ===========================
   Accessibility - Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .scroll-indicator {
    animation: fadeIn 0.3s ease-out 0.5s forwards;
  }

  .parallax {
    display: none;
  }
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
  section {
    min-height: auto;
    padding: var(--spacing-lg) 0;
  }
  
  .hero {
    min-height: 100vh;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }
}
