/* ===== CSS Variables ===== */
:root {
  /* Colors */
  --color-accent: #1E3A5F;
  --color-background: #F9F7F3;
  --color-background-alt: #FFFFFF;
  --color-border: #D4CFC5;
  --color-link: #2E7D6E;
  --color-link-hover: #1D5248;
  --color-surface: #E8E4DC;
  --color-surface-hover: #D4CFC5;
  --color-tag-bg: #EDE9E0;
  --color-tag-text: #2D2D2D;
  --color-text-muted: #8A8A8A;
  --color-text-primary: #2D2D2D;
  --color-text-secondary: #5A5A5A;

  /* Fonts */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'JetBrains Mono', monospace;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 20px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-background);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-hover);
}

/* ===== Layout ===== */
.site {
  max-width: 1020px;
  margin: 0 auto;
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-2xl) var(--spacing-xl);
}

/* ===== Section Header ===== */
.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.section-header .underline {
  width: 40px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* ===== Divider ===== */
.divider {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 var(--spacing-xl);
}

.divider-line {
  width: 100px;
  height: 1px;
  background-color: var(--color-border);
  border-radius: 1px;
}

/* ===== Hero Section ===== */
.hero {
  padding: var(--spacing-3xl) var(--spacing-xl) var(--spacing-2xl);
  gap: var(--spacing-lg);
}

.photo-container {
  position: relative;
  width: 170px;
  height: 170px;
}

.photo-ring {
  position: absolute;
  width: 170px;
  height: 170px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  display: none; /* Hidden by default, can be enabled */
}

.photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 10px;
  left: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-align: center;
}

.hero .title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: normal;
  color: var(--color-text-secondary);
  text-align: center;
}

.social-icons {
  display: flex;
  gap: var(--spacing-md);
}

.social-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-primary);
  transition: all 0.2s ease;
}

.social-icon:hover {
  background-color: var(--color-surface-hover);
  color: var(--color-accent);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

/* ===== About Section ===== */
.about-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  max-width: 680px;
}

.about-content p {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: normal;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.7;
}

/* ===== Experience Section ===== */
.experience-cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  width: 100%;
  max-width: 600px;
}

.experience-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-background-alt);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.experience-card .content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.experience-card .job-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.experience-card .company {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: normal;
  color: var(--color-text-secondary);
}

.experience-card .date {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: normal;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ===== Skills Section ===== */
.skills-content {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  width: 100%;
  flex-wrap: wrap;
}

.skill-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.skill-category .label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 1px;
}

.skill-category .underline {
  width: 24px;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 1px;
}

.skill-tags {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.skill-tag {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: normal;
  color: var(--color-tag-text);
  background-color: var(--color-tag-bg);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-pill);
}

/* ===== Education Section ===== */
.education-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.education-content .edu-icon {
  color: var(--color-accent);
}

.education-content .edu-icon svg {
  width: 24px;
  height: 24px;
}

.education-content p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: normal;
  color: var(--color-text-secondary);
  text-align: center;
}

/* ===== CTA Section ===== */
.cta {
  padding: var(--spacing-3xl) var(--spacing-xl);
}

.cta-decor {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.cta-line {
  width: 40px;
  height: 2px;
  background-color: var(--color-border);
  border-radius: 1px;
}

.cta-star {
  color: var(--color-accent);
}

.cta-star svg {
  width: 20px;
  height: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  background-color: var(--color-accent);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: #152a45;
  color: #FFFFFF;
}

/* ===== Footer ===== */
.footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-xl);
  background-color: var(--color-surface);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.footer-links span {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: normal;
  color: var(--color-text-muted);
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: normal;
  color: var(--color-link);
}

/* ===== Animations ===== */

/* Keyframes */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes growWidth {
  from {
    width: 0;
  }
  to {
    width: 40px;
  }
}

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

/* Hero Entrance Animations */
.hero .photo-container {
  animation: scaleIn 0.6s ease-out forwards;
}

.hero h1 {
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.2s forwards;
}

.hero .title {
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.35s forwards;
}

.hero .social-icons {
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.5s forwards;
}

.hero .social-icon {
  opacity: 0;
  animation: scaleIn 0.4s ease-out forwards;
}

.hero .social-icon:nth-child(1) { animation-delay: 0.55s; }
.hero .social-icon:nth-child(2) { animation-delay: 0.65s; }
.hero .social-icon:nth-child(3) { animation-delay: 0.75s; }

/* Scroll-Triggered Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Animation for Cards */
.experience-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out, 
              background-color 0.2s ease, box-shadow 0.2s ease;
}

.experience-cards.visible .experience-card:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.experience-cards.visible .experience-card:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.experience-cards.visible .experience-card:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.experience-cards.visible .experience-card:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }

/* Stagger Animation for Skill Tags */
.skill-tag {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out,
              background-color 0.2s ease;
}

.skill-category.visible .skill-tag:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.skill-category.visible .skill-tag:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.skill-category.visible .skill-tag:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
.skill-category.visible .skill-tag:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }

/* Section Header Underline Animation */
.section-header .underline {
  width: 0;
  transition: width 0.5s ease-out 0.2s;
}

.animate-on-scroll.visible .section-header .underline,
.section-header.visible .underline {
  width: 40px;
}

/* Divider Animation */
.divider-line {
  width: 0;
  transition: width 0.6s ease-out;
}

.divider.visible .divider-line {
  width: 100px;
}

/* CTA Star Pulse */
.cta.visible .cta-star {
  animation: pulse 2s ease-in-out infinite;
}

/* ===== Enhanced Hover Effects ===== */

/* Social Icons - Lift & Scale */
.social-icon {
  transition: all 0.25s ease;
}

.social-icon:hover {
  background-color: var(--color-surface-hover);
  color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Experience Cards - Lift & Glow */
.experience-card:hover {
  background-color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Skill Tags - Subtle Bounce */
.skill-tag {
  cursor: default;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out,
              background-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-tag:hover {
  background-color: var(--color-surface);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Primary Button - Lift with Shadow */
.btn-primary {
  transition: all 0.25s ease;
}

.btn-primary:hover {
  background-color: #152a45;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.3);
}

/* Footer Link Hover */
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--color-link-hover);
  transform: translateY(-1px);
}

/* Photo Hover Effect */
.photo {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-container:hover .photo {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Education Icon Hover */
.education-content .edu-icon {
  transition: transform 0.3s ease;
}

.education-content:hover .edu-icon {
  transform: scale(1.1);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Responsive Design ===== */

/* Tablet */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero .title {
    font-size: 14px;
  }

  .section {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .about-content p {
    font-size: 14px;
  }

  .experience-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .experience-card .date {
    align-self: flex-start;
  }

  .skills-content {
    gap: var(--spacing-xl);
  }

  .skill-category {
    width: 100%;
  }

  .skill-tags {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .hero {
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero .title {
    font-size: 13px;
    padding: 0 var(--spacing-sm);
  }

  .photo-container {
    width: 140px;
    height: 140px;
  }

  .photo-ring {
    width: 140px;
    height: 140px;
  }

  .photo {
    width: 120px;
    height: 120px;
  }

  .section {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .section-header h2 {
    font-size: 18px;
  }

  .about-content {
    padding: 0 var(--spacing-sm);
  }

  .about-content p {
    font-size: 13px;
  }

  .experience-cards {
    width: 100%;
  }

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

  .experience-card .job-title {
    font-size: 14px;
  }

  .experience-card .company,
  .experience-card .date {
    font-size: 12px;
  }

  .skills-content {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .education-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .cta {
    padding: var(--spacing-xl) var(--spacing-md);
  }
}
