/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #F8FAFC;
  color: #222;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== NAVIGATION ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

site-nav nav {
  background-color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo {
  height: 38px;
  width: auto;
  display: block;
  background-color: black;
  border-radius: 6px;

}

.nav-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
  margin: 0;
  text-align: left;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.menu li {
  margin: 0;
}

.menu a {
  display: block;
  padding: 18px 22px;
  color: #333;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  font-weight: bold;
  text-transform: uppercase;
  transition: color 0.2s, border-bottom-color 0.2s;
  border-bottom: 2px solid transparent;
}

.menu a:hover {
  color: #111;
  border-bottom-color: #555;
}

.menu a.active {
  color: #111;
  border-bottom-color: #333;
}

/* ===== HERO ===== */
.hero {
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 14%;
  text-align: left;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* Dark overlay so text stays readable over the photo */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative; /* sit above the overlay */
  max-width: 820px;
}

.hero h1 {
  font-size: 4.2rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}

.hero h1 + p {
  margin-top: 16px;
}

.hero-tagline {
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.hero-description {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  margin: 0 0 32px;
}

.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background-color: #fff;
  color: #222;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}

.btn-primary:hover {
  background-color: #eee;
}

.btn-primary-home {
  display: inline-block;
  padding: 12px 32px;
  background-color: transparent;
  color: #fff;
  border-radius: 4px;
  border: 2px solid #fff;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s, color 0.2s;
}

.btn-primary-home:hover {
  background-color: #fff;
  color: #4D4D4D;
}


/* Button inside non-hero areas stays dark */
.contact-form .btn-primary {
  background-color: #12182b;
  color: #fff;
}

.contact-form .btn-primary:hover {
  background-color: #1e293b;
}

/* ===== SHARED PAGE LAYOUT ===== */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.page-content h1 {
  font-size: 2rem;
  margin: 0 0 8px;
  color: #111;
}

.section {
  margin-top: 56px;
}

.section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}

/* ===== ABOUT PAGE ===== */
.about-hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
}

.about-photo-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.about-intro h1 {
  margin-top: 0;
}

.btn-cv {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 24px;
  background-color: #12182b;
  color: #fff;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn-cv:hover {
  background-color: #1e293b;
}

.about-intro ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-intro ul li {
  color: #444;
  font-size: 0.97rem;
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.about-intro ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #4f9cf9;
}

.about-intro p {
  color: #444;
  line-height: 1.75;
  margin: 0 0 12px;
}

/* Skills grid */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  padding: 6px 16px;
  background-color: #f0f0f0;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #333;
  border: 1px solid #ddd;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #4f9cf9;
  margin-top: 6px;
  position: relative;
}

.timeline-item:not(:last-child) .timeline-dot::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 5px;
  width: 2px;
  height: calc(100% + 20px);
  background-color: #ddd;
}

.timeline-body {
  flex: 1;
}

.timeline-date {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-body h3 {
  margin: 4px 0 6px;
  font-size: 1rem;
  color: #111;
}

.timeline-body p {
  margin: 0;
  color: #555;
  line-height: 1.65;
  font-size: 0.95rem;
}

/* ===== CONTACT PAGE ===== */
.contact-intro {
  color: #555;
  font-size: 1.05rem;
  margin: 8px 0 40px;
  line-height: 1.7;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  color: #222;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #333;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn-primary {
  align-self: flex-start;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* Contact info sidebar */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 8px;
}

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

.contact-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
}

.contact-info-item a {
  color: #222;
  font-size: 0.95rem;
  transition: color 0.2s;
  word-break: break-all;
}

.contact-info-item a:hover {
  color: #555;
  text-decoration: underline;
}

.contact-link-icon,
.footer-col ul li a.footer-contact-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.contact-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ===== SOFTWARE PAGE — PROJECT GRID ===== */
.page-heading {
  margin-bottom: 48px;
}

.page-heading h1 {
  margin: 0 0 6px;
}

.page-subtitle {
  color: #666;
  font-size: 1.05rem;
  margin: 0;
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.projects-grid .card-image {
  aspect-ratio: 16 / 8;
}

.projects-grid .card-body {
  padding: 28px 30px 30px;
}

.projects-grid .card-title {
  font-size: 1.25rem;
}

.projects-grid .card-description {
  font-size: 1rem;
}

.project-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-image {
  /* Replace background with background-image: url(...) when you have images */
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

.card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}

.card-description {
  color: #555;
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 20px;
  flex: 1;
}

.card-btn {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 18px;
  background-color: #12182b;
  color: #fff;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.card-btn:hover {
  background-color: #1e293b;
}

/* ===== PROJECT DETAIL PAGE ===== */
.project-hero {
  width: 100%;
  height: 360px;
  background-size: cover;
  background-position: center;
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: #4f9cf9;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: #2563eb;
}

.project-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 10px;
}

.project-lead {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.7;
  margin: 0 0 48px;
  max-width: 680px;
}

.project-section {
  margin-bottom: 48px;
}

.project-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}

.project-section p {
  color: #444;
  line-height: 1.75;
  margin: 0 0 14px;
}

/* Tech tags on detail page */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  padding: 6px 16px;
  background-color: #f0f4ff;
  border: 1px solid #c7d5f5;
  border-radius: 20px;
  font-size: 0.88rem;
  color: #2a4a9e;
  font-weight: 500;
}

/* Screenshots */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.screenshot-placeholder {
  aspect-ratio: 16 / 9;
  background-color: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.85rem;
}

/* Use this class when replacing placeholders with real <img> tags */
.screenshot {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* ===== FOOTER ===== */
site-footer footer {
  background-color: #212623;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 52px 32px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand-logo {
  height: 36px;
  width: auto;
  background-color: #000;
  border-radius: 5px;
  padding: 3px 6px;
  margin-bottom: 14px;
  display: block;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.65;
  font-size: 0.88rem;
  margin: 0;
}

.footer-col h4 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s, padding-left 0.2s;
  font-size: 0.9rem;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: #a3e635;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  padding: 16px 32px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}

/* Make sure pages fill the viewport so footer sits at bottom */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* ===== HAMBURGER ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #333;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; }
.nav-toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 99;
  }

  .menu.menu--open {
    display: flex;
  }

  .menu a {
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    border-left: none;
  }

  site-nav nav {
    position: relative;
  }
  /* Hero mobile fix */
  .hero {
    justify-content: center;
    padding: 40px 24px;
    background-position: 37% center;
    text-align: center;
  }

  .hero::before {
    background: rgba(0, 0, 0, 0.38);
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .about-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-intro ul {
    text-align: left;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

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

  .project-hero {
    height: 220px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
