/* CSS Variables for Theme System */
:root {
  --font-size: 14px;
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: #030213;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.95 0.0058 264.53);
  --secondary-foreground: #030213;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --destructive: #d4183d;
  --destructive-foreground: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --input: transparent;
  --input-background: #f3f3f5;
  --switch-background: #cbced4;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: oklch(0.708 0 0);
  --radius: 0.625rem;
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
}

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

html {
  font-size: var(--font-size);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
  max-width: 540px;
  margin: 0 auto;
  padding: 72px 0;
  display: flex;
  flex-direction: column;
  gap: 35px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .container {
    max-width: none;
    padding: 32px 20px;
    gap: 24px;
  }
}

/* Profile Header Layout */
.profile-header {
  display: flex;
  flex-direction: row-reverse; /* Change this line */
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  width: 100%;
}

.profile-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-image {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.profile-image img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-name {
  font-size: 24px;
  line-height: 1.2;
  font-weight: var(--font-weight-normal);
  margin: 0;
}

.profile-tag {
  width: fit-content;  /* Makes container fit the content */
  background-color: var(--muted);
  border-radius: 999px;
  color: var(--muted-foreground);
  padding: 4px 12px;  /* 4px top/bottom, 8px left/right */
  display: inline-flex;  /* Ensures proper content fitting */
  align-items: center;
}



/* Mobile Responsive Layout */
@media screen and (max-width: 768px) {
  .profile-header {
      flex-direction: column;
      align-items: flex-end;
      gap: 1.5rem;
  }

  .profile-content {
      width: 100%;
      flex-direction: column;
      align-items: center;
      text-align: center;
  }

  .profile-image {
      width: 120px;
      height: 120px;
  }

  .profile-info {
      align-items: center;
  }
}
/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 8px;
  background-color: var(--muted);
  color: var(--foreground);
  opacity: 0.7;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  opacity: 1;
  background-color: var(--accent);
}

.theme-icon {
  width: 16px;
  height: 16px;
  display: none;
}

body:not(.dark) .sun-icon {
  display: block;
}

.dark .moon-icon {
  display: block;
}

/* Section Styles */
.section {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin-top: 1rem;    /* Space above each section */
  margin-bottom: 1rem; /* Space below each section */
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-medium);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--foreground);
  margin-bottom: 1.5rem; /* Space between title and content */
}

.section-text {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--muted-foreground);
}

/* First section should not have top margin */
.section:first-of-type {
    margin-top: 0;
}

/* Last section should have bottom margin for footer space */
.section:last-of-type {
    margin-bottom: 4rem;
}

/* Experience Items */
.experience-item {
  margin-bottom: 36px;
}

.experience-item:last-child {
  margin-bottom: 0;
}

.experience-content {
  display: flex;
  flex-direction: column-reverse;
  gap: 24px;
  width: 100%;
}

@media (min-width: 640px) {
  .experience-content {
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.experience-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.experience-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--foreground);
}

.experience-location,
.experience-company {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 13.672px;
  line-height: 22.4px;
  color: var(--muted-foreground);
}

.experience-company {
  font-size: 14px;
  padding-top: 8px;
}

.experience-date {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 13.672px;
  line-height: 22.4px;
  color: var(--muted-foreground);
  text-align: left;
  white-space: pre;
  width: 100%;
}

@media (min-width: 640px) {
  .experience-date {
    width: 84.33px;
    text-align: right;
    padding-right: 36px;
  }
}

/* Education Items */
.education-item {
  margin-bottom: 23px;
}

.education-content {
  display: flex;
  flex-direction: column-reverse;
  gap: 24px;
  width: 100%;
}

@media (min-width: 640px) {
  .education-content {
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.education-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.education-title {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--foreground);
}

.education-field,
.education-institution {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 13.672px;
  line-height: 22.4px;
  color: var(--muted-foreground);
}

.education-institution {
  font-size: 14px;
  padding-top: 8px;
}

.education-date {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--muted-foreground);
  text-align: left;
  white-space: pre;
  width: 100%;
}

@media (min-width: 640px) {
  .education-date {
    width: 88.53px;
    text-align: right;
    padding-right: 36px;
  }
}

/* Project Items */
.project-item {
  margin-bottom: 36px;
}

.project-item:last-child {
  margin-bottom: 0;
}

.project-content {
  display: flex;
  flex-direction: column-reverse;
  gap: 24px;
  width: 100%;
}

@media (min-width: 640px) {
  .project-content {
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.project-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--foreground);
}

.project-description {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--muted-foreground);
}

.project-date {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--muted-foreground);
  text-align: left;
  white-space: pre;
  width: 100%;
}

@media (min-width: 640px) {
  .project-date {
    width: 58.86px;
    text-align: right;
    padding-right: 36px;
  }
}

/* Hobbies Grid */
.hobbies-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .hobbies-grid {
    flex-direction: row;
    gap: 24px;
    align-items: center;
  }
}

.hobby-item {
    font-family: 'Inter', sans-serif;
    font-weight: var(--font-weight-normal);
    font-size: 14px;
    line-height: 22.4px;
    color: var(--muted-foreground);  /* Changed to muted foreground */
    white-space: pre;
}

/* Books Grid */
.books-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  width: 100%;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .books-grid {
    gap: 24px;
  }
}

.book-item {
    font-family: 'Inter', sans-serif;
    font-weight: var(--font-weight-normal);
    font-size: 14px;
    line-height: 22.4px;
    color: var(--muted-foreground);  /* Changed to muted foreground */
    white-space: pre;
}

/* Contact Items */
.contact-item {
  margin-bottom: 24px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: flex-end;
  width: 100%;
}

.contact-label {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--muted-foreground);
  width: 90px;
  text-align: left;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.contact-link span {
  font-family: 'Inter', sans-serif;
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--foreground);
  white-space: pre;
}

/* Arrow Icons */
.arrow-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform 0.3s ease;
}

.contact-item .arrow-icon {
  width: 12px;
  height: 12px;
}

/* Clickable Items */
.clickable {
  cursor: pointer;
  transition: all 0.3s ease;
}

.clickable:hover .arrow-icon {
  transform: rotate(-45deg);
}

/* Background Image Section */
.background-image-section {
  background-color: #E7E7E7;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 100%;
}

.background-img {
  width: 70%;
  aspect-ratio: 958/239;
  object-fit: cover;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Animations and Transitions */
* {
  transition: color 0.3s ease, background-color 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .experience-content,
  .education-content,
  .project-content {
    gap: 16px;
  }
  
  .experience-date,
  .education-date,
  .project-date {
    font-size: 13px;
  }
}