/* ===========================
   DESIGN SYSTEM - Dark Theme + Tiffany Blue
   =========================== */

:root {
  /* Color Palette */
  --bg-primary: #0d0d0d;
  --bg-secondary: #161616;
  --bg-tertiary: #1e1e1e;
  --text-primary: #f5f5f5;
  --text-secondary: #c0c0c0;
  --text-muted: #888888;
  --accent: #0abab5;
  --accent-dark: #098a85;
  --accent-light: #1ed4ce;
  --border: #2a2a2a;
  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  --font-mono: 'Courier New', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ===========================
   RESET & BASE STYLES
   =========================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(10, 186, 181, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(10, 186, 181, 0.03) 0%, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Respect user's motion preferences */
@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;
  }
}

/* ===========================
   TYPOGRAPHY
   =========================== */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.875rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--accent-light);
}

code {
  background-color: var(--bg-secondary);
  color: var(--accent);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

/* ===========================
   COMPONENTS - BUTTONS
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background-color: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(10, 186, 181, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background-color: rgba(10, 186, 181, 0.1);
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.btn-small {
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
}

/* ===========================
   COMPONENTS - CARDS
   =========================== */

.card {
  background-color: var(--bg-secondary);
  background-image: linear-gradient(135deg, rgba(10, 186, 181, 0.05) 0%, transparent 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-dark));
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(10, 186, 181, 0.2);
  background-image: linear-gradient(135deg, rgba(10, 186, 181, 0.1) 0%, transparent 100%);
}

.card-header {
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card-body {
  margin-bottom: var(--space-md);
}

.card-footer {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

/* ===========================
   SECTIONS
   =========================== */

section {
  padding: var(--space-3xl) var(--space-xl);
  position: relative;
}

section:nth-child(odd) {
  background: linear-gradient(135deg, rgba(10, 186, 181, 0.03) 0%, transparent 100%);
}

section:nth-child(even) {
  background: linear-gradient(45deg, rgba(10, 186, 181, 0.02) 0%, transparent 100%);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--space-2xl);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 3rem;
  height: 4px;
  background: linear-gradient(to right, var(--accent), transparent);
  border-radius: 2px;
}

/* ===========================
   LAYOUT - GRID & FLEX
   =========================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.row {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  align-items: flex-start;
}

/* ===========================
   TIMELINE
   =========================== */

.timeline {
  position: relative;
  padding: var(--space-2xl) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  margin-bottom: var(--space-3xl);
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: 50%;
  padding-right: var(--space-xl);
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 50%;
  margin-right: 0;
  padding-left: var(--space-xl);
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--accent);
  border: 4px solid var(--bg-primary);
  z-index: 10;
}

.timeline-content {
  background-color: var(--bg-secondary);
  background-image: linear-gradient(135deg, rgba(10, 186, 181, 0.04) 0%, transparent 100%);
  border-left: 2px solid var(--accent);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
}

.timeline-content:hover {
  border-left-color: var(--accent-light);
  box-shadow: 0 4px 12px rgba(10, 186, 181, 0.15);
  background-image: linear-gradient(135deg, rgba(10, 186, 181, 0.08) 0%, transparent 100%);
}

.timeline-date {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  background-color: rgba(10, 186, 181, 0.1);
  color: var(--accent);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

/* Mobile: Stack timeline vertically */
@media (max-width: 768px) {
  .timeline::before {
    left: 2rem;
  }

  .timeline-marker {
    left: 2rem;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 5rem;
    margin-right: 0;
    padding-left: var(--space-lg);
  }
}

/* ===========================
   SKILLS GRID
   =========================== */

.skill-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.skill-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-percentage {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 700;
}

.skill-bar {
  width: 100%;
  height: 6px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  border-radius: var(--radius-sm);
  transition: width var(--transition-slow);
}

/* ===========================
   STICKY HEADER/NAV
   =========================== */

header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: rgba(13, 13, 13, 0.95);
  background-image: linear-gradient(135deg, rgba(10, 186, 181, 0.02) 0%, transparent 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) var(--space-xl);
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-brand::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-base);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-base);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  width: 100%;
}

@media (max-width: 768px) {
  header nav {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .nav-links {
    gap: var(--space-lg);
  }
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  background: linear-gradient(180deg, 
    rgba(10, 186, 181, 0.05) 0%, 
    transparent 50%, 
    rgba(10, 186, 181, 0.02) 100%);
}

.hero-content {
  max-width: 600px;
}

.hero-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin-bottom: var(--space-xl);
  display: inline-block;
  animation: fadeInDown 0.8s ease-out;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero .cta-buttons {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ===========================
   FORM STYLES
   =========================== */

.form-group {
  margin-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

input,
textarea,
select {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fade-in {
  animation: fadeIn var(--transition-base);
}

.fade-in-up {
  animation: fadeInUp var(--transition-base);
}

/* ===========================
   UTILITY CLASSES
   =========================== */

.mt {
  margin-top: var(--space-lg);
}

.mb {
  margin-bottom: var(--space-lg);
}

.py {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
  :root {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.875rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  section {
    padding: var(--space-2xl) var(--space-lg);
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .subtitle {
    font-size: 1.25rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  section {
    padding: var(--space-xl) var(--space-md);
  }

  .hero {
    min-height: auto;
    padding: var(--space-2xl) var(--space-md);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .btn {
    width: 100%;
  }
}
