/* ============================================================
   Portfolio Site — style.css
   To customize: search for "YOUR" and replace with your info
   ============================================================ */

/* --- Variables --- */
:root {
  --accent: #111111;
  --accent-hover: rgba(17, 17, 17, 0.82);
  --text: #111111;
  --text-muted: #666;
  --bg: #ffffff;
  --nav-height: 58px;
  --font-display: 'Shrikhand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  border-bottom: 1px solid #f2f2f2;
}

.nav-logo {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.nav-logo:hover {
  opacity: 0.5;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.nav-links a:hover {
  opacity: 0.45;
}

.nav-links .linkedin-icon {
  display: flex;
  align-items: center;
}

.nav-links .linkedin-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
  transition: fill 0.2s;
}

.nav-links .linkedin-icon:hover svg {
  opacity: 0.45;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  z-index: 0;
  /*
    TO USE YOUR OWN PHOTO:
    Replace the second gradient below with: url('images/hero.jpg')
    Example: background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('images/hero.jpg') center/cover no-repeat;
  */
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url('images/hero.jpg') center/cover no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

/* Pushes scrollable content down so it starts below the fixed hero */
.scroll-content {
  position: relative;
  z-index: 1;
  margin-top: 100vh;
  background: var(--bg);
}

.hero-name {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(2.66rem, 6.65vw, 6.175rem);
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.75rem;
  max-width: 700px;
  text-align: center;
  line-height: 1.8;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  animation: bounce 2s ease-in-out infinite;
}

.hero-scroll svg {
  width: 28px;
  height: 28px;
  stroke: rgba(255, 255, 255, 0.7);
  fill: none;
  stroke-width: 2;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(9px); }
}

/* ============================================================
   PORTFOLIO GRID  (index.html)
   ============================================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px 3%;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.portfolio-item .thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.portfolio-item .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: brightness(0.88) saturate(1.15);
}

.portfolio-item:hover .thumb {
  transform: scale(1.04);
}

.portfolio-item .overlay {
  position: absolute;
  inset: 0;
  background: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.portfolio-item:hover .overlay {
  opacity: 1;
}

.overlay-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem 1.5rem;
  line-height: 1.6;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* Title below tile — shown on touch devices (iPad/mobile), hidden on hover-capable screens */
.tile-label {
  display: none;
  padding: 0.6rem 0.25rem 0.4rem;
}

.tile-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

@media (hover: none) and (pointer: coarse) {
  .portfolio-item .overlay {
    display: none;
  }
  .tile-label {
    display: block;
  }
}

/* Center the last row when it has fewer tiles than columns */
.portfolio-last-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.portfolio-last-row .portfolio-item {
  flex: 0 0 calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
}

@media (max-width: 900px) {
  .portfolio-last-row {
    display: contents;
  }
  .portfolio-last-row .portfolio-item {
    max-width: none;
    flex: none;
  }
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-wrapper {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem 3rem;
  text-align: center;
}

.about-photo {
  width: min(380px, 75vw);
  aspect-ratio: auto;
  object-fit: contain;
  filter: grayscale(100%);
  display: block;
  margin-bottom: 2.5rem;
}

.about-greeting {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.about-bio {
  max-width: 580px;
  line-height: 1.9;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.back-to-top {
  margin-top: 4rem;
  text-align: center;
}

.back-to-top a {
  display: inline-flex;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.back-to-top a:hover {
  color: var(--accent);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */
.project-page {
  padding-bottom: 3rem;
}

.project-header {
  padding: 3rem 6% 1.5rem;
  text-align: center;
}

.project-title {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  line-height: 1.3;
}

.project-overview {
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.95;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Desktop: text left, image right — fits in one screen */
@media (min-width: 900px) {
  .project-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    align-items: center;
    min-height: calc(100vh - var(--nav-height));
    padding: 0 6% 2rem;
    column-gap: 4rem;
  }

  .project-page .project-header {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
    text-align: left;
    align-self: center;
  }

  .project-page .img-grid-1 {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    max-width: none;
    align-self: center;
  }

  .project-page .img-grid-1 img {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .project-page .back-to-top {
    display: none;
  }
}

.project-section {
  padding: 3.5rem 6%;
  text-align: center;
}

.project-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}

.project-section-desc {
  max-width: 680px;
  margin: 0 auto 3rem;
  line-height: 1.95;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-section-desc a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Image layouts */
.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.img-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.img-grid-1 {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 6%;
}

.img-grid-full {
  width: 100%;
}

.img-grid-2 img,
.img-grid-3 img,
.img-grid-1 img,
.img-grid-full img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.img-grid-2 img    { aspect-ratio: 16 / 10; max-height: 300px; }
.img-grid-3 img    { aspect-ratio: 1 / 1;  max-height: 260px; }
.img-grid-1 img    { aspect-ratio: 16 / 9;  max-height: 420px; }
.img-grid-full img { aspect-ratio: 21 / 9;  max-height: 340px; }

/* Laptop mockup (centered single image) */
.img-mockup {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 6%;
}

.img-mockup img {
  width: 100%;
  display: block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-top: 1px solid #f2f2f2;
    border-bottom: 1px solid #f2f2f2;
    padding: 1rem 4%;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f5f5f5;
    width: 100%;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .img-grid-2 {
    grid-template-columns: 1fr;
  }

  .img-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .project-header {
    padding: 3rem 4% 2rem;
  }
}
