/* =====================================================
   PORTFOLIO WEBSITE STYLES
   Inspired by Isaac Blankensmith's minimalist aesthetic
   ===================================================== */

/* Import modern sans-serif font (similar to Suisse Int'l) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ==================
   GLOBAL RESET & BASE STYLES
   ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
  --color-hover: #888888;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;
  --font-size-small: 14px;
  --font-size-large: 18px;
  --line-height: 1.6;

  /* Spacing */
  --spacing-xs: 8px;
  /* Tiny gaps: tags and very tight spacing */
  --spacing-sm: 16px;
  /* Small gaps: paragraph and small element spacing */
  --spacing-md: 16px;
  /* Medium gaps: header/main top spacing and section gaps */
  --spacing-lg: 48px;
  /* Large gaps: default main-content spacing */
  --spacing-xl: 36px;
  /* Extra-large gaps: project grid spacing */
  --spacing-xxl: 96px;
  /* Largest gaps: loading/error block padding */

  /* Layout */
  --max-width: 1400px;
  --content-padding: 48px;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================
   TYPOGRAPHY
   ================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 18px;
}

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

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

p {
  margin-bottom: var(--spacing-sm);
}

/* ==================
   HEADER
   ================== */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-start;
  padding: var(--spacing-md) var(--content-padding);
  background-color: var(--color-bg);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.header-left {
  max-width: 500px;
  grid-column: 1;
}

.site-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  line-height: 1.4;
}

.site-title:hover {
  opacity: 0.7;
}

.header-bio {
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.5;
  font-weight: 400;
  max-width: 100%;
  word-wrap: break-word;
}

.header-right {
  grid-column: 2;
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  justify-self: center;
  padding-top: 2px;
}

.nav-link {
  font-size: 16px;
  font-weight: 400;
  position: relative;
  white-space: nowrap;
}

.nav-link::before {
  content: '↳';
  margin-right: 4px;
}

/* ==================
   MAIN CONTENT
   ================== */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-sm) var(--content-padding);
  width: 100%;
}

/* Home page: tighten gap between header bio and project grid */
.home-page .main-content {
  padding-top: var(--spacing-md);
}

/* ==================
   PROJECT GRID (Home Page)
   ================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
}

.home-page .projects-grid {
  margin-top: var(--spacing-md);
}

.project-card {
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-thumbnail {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: var(--spacing-sm);
  background-color: #f5f5f5;
}

.project-info {
  padding: var(--spacing-xs) 0;
}

.project-title {
  font-size: var(--font-size-large);
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
}

.project-description {
  font-size: var(--font-size-small);
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background-color: var(--color-bg);
  transition: all 0.2s ease;
}

.tag:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* ==================
   ABOUT PAGE - DARK THEME
   ================== */
.about-page {
  background-color: #000000;
  color: #ffffff;
  min-height: 100vh;
}

.about-page .site-header {
  background-color: #000000;
  border-bottom-color: #333333;
  grid-template-columns: auto 1fr;
}

.about-page .header-left {
  grid-column: 1;
}

.about-page .header-right {
  grid-column: 2;
  justify-self: center;
}

.about-page .site-title,
.about-page .header-bio,
.about-page .nav-link {
  color: #ffffff;
}

.about-page .nav-link:hover {
  color: #cccccc;
}

.about-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Profile Header Section */
.about-header {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  align-items: start;
}

.profile-image {
  width: 100%;
  max-width: 1400px;
  aspect-ratio: 1400 / 781;
  object-fit: cover;
  border-radius: 0;
}

.about-intro {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: var(--spacing-md);
}

.about-name {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: var(--spacing-lg);
  color: #ffffff;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--spacing-xl);
  font-size: 14px;
}

.contact-link {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.contact-link::before {
  content: '↳';
  margin-right: 6px;
}

.contact-link:hover {
  opacity: 0.7;
}

.bio-text {
  font-size: 14px;
  color: #cccccc;
  line-height: 1.7;
  margin-bottom: 0;
}

/* Animated Dotted Line Separator */
.dotted-separator {
  width: 100%;
  height: 1px;
  margin: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.dotted-separator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 1px;
  background-image: repeating-linear-gradient(to right,
      #666666 0px,
      #666666 4px,
      transparent 4px,
      transparent 12px);
  animation: moveDots 20s linear infinite;
}

@keyframes moveDots {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Three Column Layout */
.about-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.about-section {
  margin-bottom: 0;
}

.section-title {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: var(--spacing-md);
  padding-bottom: 0;
  border-bottom: none;
  color: #ffffff;
}

.experience-item,
.education-item {
  margin-bottom: var(--spacing-lg);
}

.item-header {
  margin-bottom: 8px;
}

.item-title {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 4px;
  color: #ffffff;
}

.item-meta {
  font-size: 12px;
  color: #999999;
  line-height: 1.5;
}

.achievements-list {
  list-style: none;
  margin-left: 0;
}

.achievements-list li {
  font-size: 12px;
  color: #999999;
  margin-bottom: 8px;
  padding-left: 0;
  position: relative;
  line-height: 1.6;
}

.achievements-list li::before {
  display: none;
}

.skills-category {
  margin-bottom: var(--spacing-lg);
}

.skills-category h4 {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: var(--spacing-sm);
  color: #ffffff;
}

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

.skills-list li {
  font-size: 12px;
  color: #999999;
  margin-bottom: 8px;
  padding-left: 0;
  position: relative;
  line-height: 1.6;
}

.skills-list li::before {
  display: none;
}

/* ==================
   PROJECT DETAIL PAGE
   ================== */

.project-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  /* Reduced padding only for project pages */
}

/* Two Column Layout */
.project-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.project-detail-title {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: var(--spacing-xl);
  color: var(--color-text);
}

.project-detail-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 400;
}

.meta-item span:not(.meta-label) {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 400;
}

.project-images {
  margin-top: var(--spacing-xl);
}

.project-image {
  width: 100%;
  height: auto;
  margin-bottom: var(--spacing-lg);
  display: block;
}

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

/* Tablet breakpoint */
@media (max-width: 768px) {
  :root {
    --content-padding: 24px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

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

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

  .project-content-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Mobile breakpoint: 375px - 425px */
@media (max-width: 425px) {
  :root {
    --content-padding: 20px;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 40px;
    --spacing-xxl: 48px;
  }

  /* ==================
     HEADER - Mobile Layout
     ================== */
  .site-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: var(--spacing-md) var(--content-padding);
    gap: 0;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    text-align: left !important;
  }

  .header-left {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: var(--spacing-sm);
    text-align: left !important;
  }

  .site-title {
    font-size: 16px;
    margin-bottom: 4px;
    text-align: left !important;
    display: block;
  }

  .header-bio {
    font-size: 14px;
    line-height: 1.5;
    max-width: 100%;
    text-align: left !important;
  }

  .header-right {
    width: 100% !important;
    justify-content: flex-start !important;
    padding-top: 0;
    text-align: left !important;
    display: flex;
    align-items: flex-start;
  }

  .nav-link {
    font-size: 14px;
    text-align: left !important;
  }

  /* About page header adjustments */
  .about-page .site-header {
    grid-template-columns: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .about-page .header-left {
    grid-column: auto !important;
    width: 100% !important;
  }

  .about-page .header-right {
    grid-column: auto !important;
    justify-self: flex-start !important;
    width: 100% !important;
  }

  /* ==================
     MAIN CONTENT - Full Width
     ================== */
  .main-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: var(--spacing-md) var(--content-padding);
    text-align: left !important;
  }

  .home-page .main-content {
    padding-top: var(--spacing-sm);
  }

  /* Force left alignment for all text elements */
  body,
  p,
  h1,
  h2,
  h3,
  h4 {
    text-align: left !important;
  }

  /* ==================
     HOME PAGE - Project Grid
     ================== */
  .projects-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-md);
    width: 100%;
  }

  .home-page .projects-grid {
    margin-top: var(--spacing-md);
  }

  .project-card {
    width: 100%;
  }

  .project-thumbnail {
    width: 100%;
    aspect-ratio: 4/3;
    margin-bottom: var(--spacing-sm);
  }

  .project-info {
    padding: var(--spacing-xs) 0;
  }

  .project-title {
    font-size: 16px;
    margin-bottom: var(--spacing-xs);
  }

  .project-description {
    font-size: 14px;
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
  }

  /* Tags positioned directly below title/description */
  .project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: var(--spacing-xs);
  }

  .tag {
    font-size: 10px;
    padding: 4px 10px;
  }

  /* ==================
     ABOUT PAGE - Mobile Layout
     ================== */
  .about-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    text-align: left !important;
  }

  /* Profile header - vertical stack */
  .about-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
  }

  .profile-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4/3;
    order: 1;
  }

  .about-intro {
    width: 100%;
    padding-top: 0;
    order: 2;
  }

  .about-name {
    font-size: 14px;
    margin-bottom: var(--spacing-md);
  }

  .contact-links {
    gap: 8px;
    margin-bottom: var(--spacing-lg);
    font-size: 13px;
  }

  .bio-text {
    font-size: 13px;
    line-height: 1.6;
  }

  .dotted-separator {
    margin: var(--spacing-lg) 0;
  }

  /* Experience, Education, Skills - Vertical List */
  .about-columns {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
  }

  .about-section {
    width: 100%;
  }

  .section-title {
    font-size: 13px;
    margin-bottom: var(--spacing-md);
  }

  .experience-item,
  .education-item {
    margin-bottom: var(--spacing-lg);
  }

  .item-title {
    font-size: 13px;
  }

  .item-meta {
    font-size: 12px;
    line-height: 1.5;
  }

  .achievements-list li {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 6px;
  }

  .skills-category {
    margin-bottom: var(--spacing-md);
  }

  .skills-category h4 {
    font-size: 13px;
    margin-bottom: var(--spacing-sm);
  }

  .skills-list li {
    font-size: 12px;
    line-height: 1.5;
  }

  /* ==================
     PROJECT DETAIL PAGE - Mobile
     ================== */
  .project-detail {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 var(--content-padding);
    text-align: left !important;
  }

  .project-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .project-detail-title {
    font-size: 24px;
    margin-bottom: var(--spacing-sm);
  }

  .project-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
  }

  /* Metadata - tightly stacked */
  .project-meta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    width: 100%;
  }

  .meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .meta-label {
    font-size: 11px;
  }

  .meta-item span {
    font-size: 13px;
  }

  .project-images {
    gap: var(--spacing-md);
  }

  .project-image-item img {
    width: 100%;
  }

  /* ==================
     TYPOGRAPHY - Mobile Adjustments
     ================== */
  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }

  h4 {
    font-size: 14px;
  }

  p {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* ==================
   UTILITY CLASSES
   ================== */
.loading {
  text-align: center;
  padding: var(--spacing-xxl);
  color: var(--color-text-light);
}

.error {
  text-align: center;
  padding: var(--spacing-xxl);
  color: #d32f2f;
}

.back-link {
  display: inline-block;
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-small);
}

.back-link::before {
  content: '← ';
  margin-right: 4px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}