/* ========================================================================== */
/* 0) Imports                                                                 */
/* ========================================================================== */

/* Font Awesome Icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');


/* ========================================================================== */
/* 1) Reset & Base Styles                                                     */
/* ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato';
    font-size: 17px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    color: #4a4a4a;
    line-height: 1.6;
}


/* ========================================================================== */
/* 2) Header & Navigation                                                     */
/* ========================================================================== */

header {
    background-color: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 a {
    color: #2d2d2d;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

nav a {
    text-decoration: none;
    color: #6a6a6a;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: #2d2d2d;
    border-bottom-color: #2d2d2d;
}

/* Active nav link */
nav a.active {
    color: #2d2d2d;
    border-bottom-color: #2d2d2d;
}

/* Mid heading: bigger than h3, smaller than h2 */
.h3-large {
  font-size: clamp(1.8rem, 4.5vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.3px;
  color: #2d2d2d;
  margin-bottom: 0.75rem;
}

/* ========================================================================== */
/* 3) Hero Section                                                            */
/* ========================================================================== */

.hero {
    text-align: center;
    padding: 4.5rem 2rem 1.25rem;
    position: relative;
    margin: 0 auto;
    max-width: 800px;
}


.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #2d2d2d;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.2rem;
    color: #6a6a6a;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero .about-me {
    margin-top: 2rem;  /* Reduced from 3rem */
    padding: 1.5rem;   /* Slightly reduced padding */
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* About page avatar */
.hero .avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    display: block;
    margin: 0 auto 1rem;
}

/* Buttons row under hero text */
.hero .hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.inline-link {
  color: #4a4a4a;         /* accent color */
  font-weight: 500;        /* a bit bolder */
  text-decoration: none;   /* no underline by default */
  font-size: inherit;      /* same size as surrounding text */
}

.inline-link:hover {
  text-decoration: underline;
}

.inline-link:visited {
  color: #4a4a4a;
}

/* ========================================================================== */
/* 4) Buttons (Base styles shared across components)                          */
/* ========================================================================== */

/* Base button look (matches project-card buttons) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2d2d2d;            /* or var(--accent) if you added themes */
    color: #fff;
    padding: 0.8rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: #1a1a1a; }
.btn:visited { color: #fff; }


/* ========================================================================== */
/* 5) Project Cards                                                           */
/* ========================================================================== */

.project-card {
  background: #ffffff;
  padding: 2rem;
  padding-left: 2rem;
  padding-right: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  margin: 1.5rem auto;
  max-width: 800px;

  /* Accent bar that follows rounded corners */
  border-left: 4px solid #2d2d2d;
}

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

.project-card h3 {
  color: #2d2d2d;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.project-card p {
  font-weight: 400;
  color: #6a6a6a;
  line-height: 1.7;
}

.project-card p + p { margin-top: 1rem; }

.project-card ul {
  list-style: none;
  margin: 0.5em 0 1em 1.5em;
  padding: 0;
}

.project-card li {
  color: #6a6a6a;
  font-weight: 400;
  line-height: 1.6;
  margin: 0.25em 0;
  position: relative;
}

.project-card li::before {
  content: "- ";
  position: absolute;
  left: -1.2em;
  color: #6a6a6a;
}

/* ========================================================================== */
/* 6) Projects Index Grid & Tiles                                             */
/* ========================================================================== */

:root {
  --tile-w: 460px;
  --tile-h: 265px;
  --tile-gap: 2rem;
}

/* Outer container centers inner grid */
.projects-grid {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding-inline: 1.5rem;
}

/* The actual grid layout */
.projects-grid-inner {
  display: grid;
  gap: var(--tile-gap);
  grid-template-columns: repeat(1, var(--tile-w));
  max-width: calc(3 * var(--tile-w) + 2 * var(--tile-gap));
  margin: 0;
}

/* 2 columns at medium */
@media (min-width: 1000px) {
  .projects-grid-inner {
    grid-template-columns: repeat(2, var(--tile-w));
  }
}

/* 3 columns at large */
@media (min-width: 1500px) {
  .projects-grid-inner {
    grid-template-columns: repeat(3, var(--tile-w));
  }
}

/* ---------------- Tiles ---------------- */

.project-tile {
  width: 100%;
  min-height: var(--tile-h);
  box-sizing: border-box;

  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;

  /* Accent bar that follows rounded corners (same as card) */
  border-left: 4px solid #2d2d2d;
}

.project-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 16px -4px rgba(0, 0, 0, 0.08);
}

.project-tile h3 {
  color: #2d2d2d;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-tile p {
  color: #6a6a6a;
  line-height: 1.7;
  font-size: 1rem;
  margin: 0.35rem 0;
}

.project-tile p + p { margin-top: 0.5rem; }

/* ========================================================================== */
/* Shared button styles for card + tile                                       */
/* ========================================================================== */

.project-card a,
.project-tile a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  background: #2d2d2d;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;

  font-size: 1rem;
  line-height: 1.2;
  padding: 0.8rem 1.8rem;
  box-sizing: border-box;

  transition: all 0.3s ease;
}

.project-card a:hover,
.project-tile a:hover {
  background: #1a1a1a;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Context-specific placement */
.project-card a {
  margin-top: 1.5rem;
}

.project-tile a {
  margin-top: auto;
  align-self: flex-start;
  flex: 0 0 auto;
  width: auto;
}

/* ========================================================================== */
/* 7) About Page Helpers (optional blocks used on About)                      */
/* ========================================================================== */

/* Smaller tile grid for interests (reuses .project-tile styling) */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.gallery figure {
  margin: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.gallery figcaption {
  font-size: .9rem;
  color: #555;
  padding: .6rem .8rem .8rem;
}

/* Placeholder text style */
.placeholder {
  color: #888;
  font-style: italic;
}


/* ========================================================================== */
/* 8) Contact                                                                 */
/* ========================================================================== */

.contact {
    padding: 3rem 1.5rem;
    margin: 2rem auto;
    max-width: 800px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
}


.contact h2 {
    color: #2d2d2d;
    margin-bottom: 2rem;
}

.contact ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #6a6a6a;
    text-decoration: none;
    padding: 1rem 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.contact a:hover {
    border-color: #2d2d2d;
    color: #2d2d2d;
    background: #f8f9fa;
}

.contact ul { margin-top: 0; }
.contact h2 + ul,
.contact .h3-large + ul { margin-top: 2rem; }

/* ========================================================================== */
/* 9) Footer                                                                  */
/* ========================================================================== */

footer {
  position: static;                 /* no sticky/fixed */
  background: #2d2d2d;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 2rem;
  margin-top: auto;                 /* pushes footer to bottom on short pages */
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06); /* optional subtle top shadow */
}


/* ========================================================================== */
/* 10) Interactive Effects: Hover Jump & Focus                                */
/* ========================================================================== */

/* Cards can lift */
.project-card,
.project-tile {
  transform: translateY(0);
  will-change: transform;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover,
.project-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 16px -4px rgba(0, 0, 0, 0.08);
}

/* Buttons/links: no movement, just color/shadow */
.btn,
.project-card a,
.project-tile a {
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* (Optional) Better keyboard focus without movement */
.btn:focus-visible,
.project-card a:focus-visible,
.project-tile a:focus-visible {
  outline: 2px solid #2d2d2d;
  outline-offset: 2px;
}


/* ========================================================================== */
/* 11) Responsive                                                             */
/* ========================================================================== */

/* Global responsive */
@media (max-width: 768px) {
    .project-links {
        grid-template-columns: 1fr;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
    }

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

    .contact a {
        width: 100%;
        justify-content: center;
    }
}

/* About avatar tweak */
@media (max-width: 768px) {
  .hero .avatar { width: 112px; height: 112px; }
}

@media (max-width: 900px) {
  .projects-grid-inner {
    grid-template-columns: repeat(1, var(--tile-w));
  }
}


/* ========================================================================== */
/* 12) Reduced Motion                                                         */
/* ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .project-card a,
  .project-tile a,
  .btn {
    transition: none;
  }
}
