@charset "UTF-8";

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 100px 40px;
  max-width: 1200px;
  margin: 0 auto;
  /* Elegance: subtle silver tint with deep-rose accents */
  background: linear-gradient(135deg, var(--snow-pink) 0%, var(--elegant-bg) 100%);
  border-radius: 16px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.hero_content h1 {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
  font-weight: 700;
}

.hero_content p {
  font-size: 20px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.6;
}

.hero_image {
  position: relative;
}

.hero_image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

/* Featured Projects Section */
.featured_projects {
  background: var(--minimal-bg);
  border-top: 1px solid var(--minimal-surface);
  border-bottom: 1px solid var(--minimal-surface);
}

.projects_wrapper {
  position: relative;
}

.projects_grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 16px 12px;
  overflow: visible;
}

.project_link {
  text-decoration: none;
  color: inherit;
  display: block;
  max-width: none;
}

.project_card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  flex: 1;
  scroll-snap-align: start;
  height: 100%;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(12,24,40,0.06);
  display: flex;
  flex-direction: column;
}

.project_card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(24, 160, 251, 0.2);
}

.project_link:hover .project_card {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(24, 160, 251, 0.2);
}

.project_image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--snow-pink) 0%, var(--mint-white) 60%, var(--sage-green) 100%);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.proj_nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10,10,10,0.6);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
}

.proj_nav.left { left: -20px; }
.proj_nav.right { right: -20px; }

.proj_nav:hover { background: rgba(24,160,251,0.9); }

.project_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project_card:hover .project_image img {
  transform: scale(1.05);
}

.project_card h3 {
  padding: 20px 20px 10px;
  font-size: 20px;
  color: var(--text);
  margin: 0;
}

.project_card p {
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Make links fully focusable and highlight on keyboard focus */
.project_link {
  display: block;
}

.project_link:focus .project_card,
.project_link:focus-visible .project_card {
  box-shadow: 0 12px 28px rgba(24,160,251,0.12);
  transform: translateY(-6px);
  outline: none;
}

/* Blog Section */
.blog_section {
  background: var(--minimal-bg);
}

.blog_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.blog_post {
  background: transparent;
}

.blog_date {
  color: #888;
  font-size: 14px;
  margin-bottom: 10px;
}

.blog_post h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text);
}

.blog_post p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.blog_image {
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

.blog_image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}

/* Blog placeholder card */
.blog_placeholder {
  display: flex;
  justify-content: center;
  align-items: start;
  padding: 20px 0 40px;
}

.blog_card {
  width: 340px;
  border-radius: 18px;
  overflow: hidden;
  border: 4px solid #042633; /* dark teal */
  box-shadow: 0 8px 20px rgba(4,38,51,0.08);
}

.blog_card .card_header {
  background: #e87238; /* orange */
  color: #fff;
  padding: 18px 20px;
  font-size: 20px;
  font-weight: 700;
}

.blog_card .card_body {
  background: #dff9e6; /* pale green */
  color: #042633;
  padding: 18px 20px 28px;
  font-size: 15px;
  line-height: 1.6;
}

.blog_card .card_sep {
  border: none;
  height: 6px;
  background: transparent;
  border-top: 4px solid #042633; /* match outer border as separator */
  margin: 8px 0 12px;
}

/* General small separator used in cards */
.card_sep {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
  margin: 8px 0 12px;
}

@media (max-width: 768px) {
  .blog_card { width: 92%; }
}

/* About Me Section */
.about_section {
  background: var(--minimal-bg);
  padding: 80px 40px;
}

.about_section .section_container {
  max-width: 900px;
}

.about_section h2 {
  color: var(--text);
  margin-bottom: 30px;
}

.about_section p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
}

/* Contact Section */
.contact_section {
  background: var(--minimal-bg);
}

.contact_info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.email {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text);
  font-size: 16px;
}

.copy_btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.copy_btn:hover {
  background: var(--accent-dark);
}

.social_links {
  display: flex;
  gap: 30px;
}

.social_icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  color: var(--accent);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.social_icon:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-4px);
}

.social_icon svg {
  width: 24px;
  height: 24px;
}

/* Mobile */
@media (max-width: 1024px) {
  .projects_grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero {
    grid-template-columns: 1fr;
    padding: 60px 20px;
  }

  .hero_content h1 {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }

  .hero_content h1 {
    font-size: 28px;
  }

  .hero_content p {
    font-size: 16px;
  }

  .projects_grid {
    grid-template-columns: 1fr;
    padding: 8px; /* reduce horizontal padding for small screens */
    gap: 12px;
  }

  .project_image {
    height: 150px;
  }

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

  .about_section,
  .contact_section {
    padding: 40px 20px;
  }

  section {
    padding: 40px 0;
  }

  section h2 {
    font-size: 24px;
  }

  .social_links {
    gap: 20px;
  }

  .social_icon {
    width: 40px;
    height: 40px;
  }

  .social_icon svg {
    width: 20px;
    height: 20px;
  }

  /* Project nav buttons: keep them inside the viewport on small screens */
  .proj_nav {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: auto;
    bottom: 12px;
    transform: none;
    background: rgba(16,20,25,0.85);
  }

  .proj_nav.left { left: 12px; }
  .proj_nav.right { right: 12px; }

  /* Make project cards slightly narrower to improve scrolling on small screens */
  .project_link {
    flex: 0 0 280px;
  }

  /* Slightly larger tappable copy button */
  .copy_btn {
    padding: 10px 18px;
    font-size: 15px;
  }
}

/* Styles applied when JS detects a mobile device (body.is-mobile) */
body.is-mobile {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-mobile .project_card:hover {
  transform: none !important;
  box-shadow: none !important;
}

body.is-mobile .project_link {
  flex: 0 0 88% !important; /* make cards wider for easier tapping */
}

body.is-mobile .proj_nav {
  /* ensure nav buttons are visible and easy to tap */
  width: 48px;
  height: 48px;
  font-size: 22px;
  bottom: 12px;
  background: rgba(0,0,0,0.6);
}

body.is-mobile .hero_image img,
body.is-mobile .project_image img,
body.is-mobile .blog_image img {
  -webkit-user-drag: none;
  max-height: 420px;
  height: auto;
}

/* Increase tap targets for header nav on mobile detection */
body.is-mobile .header_nav li a {
  padding: 10px 8px;
  display: inline-block;
}

/* Diagonal split for two overlapping images (equal-area split via center-line) */
.project_image.diag-split {
  position: relative;
  overflow: hidden;
}

.project_image.diag-split img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Split along a line through the center at ~20deg so each side has equal area.
   Intersections with left/right edges are approximately at 31.8% and 68.2%. */
.project_image.diag-split img:first-child {
  clip-path: polygon(0 0, 100% 0, 100% 68.2%, 0 31.8%);
  z-index: 2;
  object-position: 50% 20%; /* show important area */
}

.project_image.diag-split img:last-child {
  clip-path: polygon(0 31.8%, 100% 68.2%, 100% 100%, 0 100%);
  z-index: 1;
}

.project_image.diag-split img:hover {
  transform: scale(1.05);
}

/* Fallback for browsers without clip-path support: show images side-by-side */
@supports not (clip-path: polygon(0 0, 100% 0, 100% 100%)) {
  .project_image.diag-split {
    display: flex;
  }
  .project_image.diag-split img {
    position: relative;
    width: 50%;
    height: auto;
  }
}
