/* =========================================
   Ben Gramigna — Personal Landing Page
   stylesheet.css
   ========================================= */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: #1a2e4a;
  background-color: #ffffff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

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

/* ---------- CSS Variables ---------- */
:root {
  --navy:       #1a2e4a;
  --navy-dark:  #111e33;
  --blue:       #2563eb;
  --blue-light: #3b82f6;
  --sky:        #dbeafe;
  --white:      #ffffff;
  --off-white:  #f8fafc;
  --light-gray: #e2e8f0;
  --mid-gray:   #64748b;
  --radius:     10px;
  --shadow:     0 4px 20px rgba(26, 46, 74, 0.10);
  --max-width:  1100px;
}

/* ---------- Layout Helpers ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 80px 0;
}

.section-light  { background-color: var(--off-white); }
.section-white  { background-color: var(--white); }
.section-navy   {
  background-color: var(--navy);
  color: var(--white);
}

/* ---------- Section Titles ---------- */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background-color: var(--blue);
  border-radius: 2px;
  margin-top: 10px;
}

.section-navy .section-title::after {
  background-color: var(--blue-light);
}

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255,255,255,0.80);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--white);
  outline: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
}

.btn:focus {
  outline: 3px solid var(--blue-light);
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255,255,255,0.15);
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.50);
}

.btn-secondary:hover {
  background-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 90px 2rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.hero-tagline {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: rgba(255,255,255,0.75);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-photo {
  flex-shrink: 0;
  width: 240px;
}

.hero-photo img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.20);
  box-shadow: var(--shadow);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.1rem;
  color: #334155;
  font-size: 1rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  box-shadow: 0 1px 6px rgba(26,46,74,0.06);
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mid-gray);
  margin-bottom: 0.2rem;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skills-group-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  background-color: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  color: var(--white);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.skill-tag:hover {
  background-color: rgba(255,255,255,0.18);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(26,46,74,0.14);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-tag {
  background-color: var(--sky);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.project-desc {
  font-size: 0.92rem;
  color: #475569;
  flex: 1;
}

.project-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--light-gray);
}

.project-skills li {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--mid-gray);
  background: var(--off-white);
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
}

/* ---------- Experience / Timeline ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-left: 1.5rem;
  border-left: 3px solid var(--light-gray);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.82rem;
  top: 6px;
  width: 14px;
  height: 14px;
  background-color: var(--blue);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--blue);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 2px;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
}

.timeline-location {
  font-size: 0.82rem;
  color: var(--mid-gray);
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.timeline-org {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--mid-gray);
  margin-bottom: 0.75rem;
}

.timeline-bullets {
  list-style: disc;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.timeline-bullets li {
  font-size: 0.93rem;
  color: #334155;
}

/* ---------- Contact ---------- */
.contact-intro {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background-color: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  transition: background-color 0.2s, transform 0.15s;
  color: var(--white);
}

.contact-card:hover {
  background-color: rgba(255,255,255,0.15);
  transform: translateY(-3px);
}

.contact-card:focus {
  outline: 3px solid var(--blue-light);
  outline-offset: 2px;
}

.contact-icon {
  color: var(--blue-light);
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
}

.contact-value {
  font-size: 0.92rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--navy-dark);
  color: rgba(255,255,255,0.45);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.82rem;
}

/* ---------- Focus / Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-photo {
    width: 180px;
  }

  .hero-photo img {
    width: 180px;
    height: 180px;
  }

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

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .contact-links {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 60px 0;
  }

  .nav-links {
    gap: 1.2rem;
  }

  .nav-links a {
    font-size: 0.82rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .contact-links {
    max-width: 100%;
  }
}
