﻿/* Modern portfolio refresh */
:root {
  color-scheme: light;
  --ink: #172b4d;
  --muted: #5b6b82;
  --accent: #176b62;
  --accent-dark: #10544d;
  --line: #e2e8f0;
  --surface: #ffffff;
  --page: #f4f7f8;
  --shadow: 0 16px 40px rgba(23, 43, 77, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 48px 24px 32px;
  background: radial-gradient(ellipse at top left, #e1f0ec 0, transparent 34%), var(--page);
  color: var(--ink);
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  line-height: 1.7;
}
.header, .projects, .footer { width: min(100%, 1060px); margin-inline: auto; }
.about {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: center;
  gap: 12px 42px;
  padding: clamp(28px, 6vw, 64px);
  margin: 0 auto 64px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  background: linear-gradient(125deg, #fff 0%, #f7fbfa 100%);
  box-shadow: var(--shadow);
}
.about::before {
  position: absolute; top: -120px; right: 90px; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(23,107,98,.07); content: ''; pointer-events: none;
}
.about h1 { grid-column: 1; margin: 0; color: var(--ink); font-size: clamp(2.3rem, 5vw, 3.5rem); letter-spacing: -.045em; line-height: 1.12; }
.profile-pic {
  grid-column: 2; grid-row: 1 / span 4; width: 180px; height: 180px; margin: 0 auto;
  object-fit: cover; border: 5px solid #fff; border-radius: 50%; box-shadow: 0 10px 28px rgba(23,43,77,.16);
}
.subheading { grid-column: 1; margin: 0; color: var(--accent); font-size: 1rem; font-weight: 700; letter-spacing: .025em; }
.about p:not(.subheading) { grid-column: 1; max-width: 650px; margin: 0; color: var(--muted); font-size: 1.02rem; }
.projects { padding: 0; }
h2 { margin: 0 0 24px; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.1rem); letter-spacing: -.03em; }
.project-card {
  display: flex; align-items: center; gap: clamp(22px, 4vw, 44px); padding: 22px;
  margin: 0 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: inherit; text-decoration: none; box-shadow: 0 5px 18px rgba(23,43,77,.035);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(23,107,98,.35); box-shadow: var(--shadow); }
.project-image-side { flex: 0 0 38%; min-width: 0; }
.project-image-side img { display: block; width: 100%; height: 220px; object-fit: contain; border-radius: 13px; background: #f5f8fa; }
.project-text-side { flex: 1; min-width: 0; }
.project-text-side h3 { margin: 0 0 8px; color: var(--ink); font-size: 1.22rem; letter-spacing: -.015em; }
.project-text-side p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.75; }
.footer { padding: 28px 0 8px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .95rem; }
.footer a { color: var(--accent); font-weight: 700; text-decoration: none; }
.footer a:hover { color: var(--accent-dark); text-decoration: underline; }
a:focus-visible { outline: 3px solid #63b7a7; outline-offset: 4px; }
@media (max-width: 700px) {
  body { padding: 22px 16px 24px; }
  .about { grid-template-columns: 1fr; gap: 12px; margin-bottom: 42px; border-radius: 22px; }
  .about h1, .subheading, .about p:not(.subheading) { grid-column: 1; }
  .profile-pic { grid-column: 1; grid-row: auto; grid-row: 1; width: 132px; height: 132px; margin: 0 0 8px; }
  .project-card { align-items: stretch; flex-direction: column; gap: 18px; padding: 16px; border-radius: 17px; }
  .project-image-side { flex-basis: auto; }
  .project-image-side img { height: auto; max-height: 240px; aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Two-column portfolio grid */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.projects > h2 { grid-column: 1 / -1; margin-bottom: 2px; }
.project-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  height: 100%;
  padding: 18px;
}
.project-image-side { flex: none; width: 100%; }
.project-image-side img {
  width: 100%;
  height: 220px;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}
.project-text-side { flex: 1; }
.project-text-side h3 { font-size: 1.12rem; }
@media (max-width: 700px) {
  .projects { grid-template-columns: 1fr; gap: 16px; }
  .projects > h2 { margin-bottom: 4px; }
  .project-card { gap: 14px; }
  .project-image-side img { height: auto; max-height: 260px; }
}

/* Scroll reveal is enabled only when JavaScript is available. */
.js-motion .project-card,
.js-motion .about {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.js-motion .project-card.is-visible,
.js-motion .about.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js-motion .project-card,
  .js-motion .about {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.project-details {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.62;
}
.project-details li {
  position: relative;
  padding-left: 18px;
}
.project-details li::before {
  position: absolute;
  top: .68em;
  left: 1px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  content: '';
  transform: rotate(45deg);
}

/* Distinct soft tints keep the project grid lively and easy to scan. */
.project-card {
  background-color: var(--card-tint, #fff);
  transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease, background-color .32s ease;
}
.project-card.tone-mint { --card-tint: #eff8f4; }
.project-card.tone-sky { --card-tint: #eef5fb; }
.project-card.tone-lilac { --card-tint: #f5f1fa; }
.project-card.tone-sand { --card-tint: #fbf5eb; }
.project-card:hover { background-color: #fff; }
@keyframes card-arrive {
  from { opacity: 0; transform: translateY(24px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.js-motion .project-card.is-visible { animation: card-arrive .6s cubic-bezier(.2,.7,.25,1) both; }
@media (prefers-reduced-motion: reduce) {
  .js-motion .project-card.is-visible { animation: none; }
}

/* Slow black, white and navy background flow */
body {
  background: linear-gradient(125deg, #ffffff 0%, #edf2f8 28%, #d9e2ef 45%, #19385f 68%, #101722 82%, #ffffff 100%);
  background-size: 320% 320%;
  animation: navy-background-flow 26s ease-in-out infinite;
}
@keyframes navy-background-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.projects > h2 {
  width: fit-content;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 6px 22px rgba(10,25,48,.08);
}
.footer {
  padding: 18px 24px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 16px;
  background: rgba(255,255,255,.9);
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; background: #edf2f8; }
}
.connect-label { margin: 0 0 10px; color: var(--ink); font-weight: 700; }
.social-links { display: flex; justify-content: center; gap: 14px; }
.social-bubble { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: #fff; box-shadow: 0 7px 20px rgba(10,25,48,.14); transition: transform .2s ease, box-shadow .2s ease; }
.social-bubble svg { width: 22px; height: 22px; fill: #fff; }
.linkedin-bubble { background: #0a66c2; }
.github-bubble { background: #172b4d; }
.social-bubble:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 10px 24px rgba(10,25,48,.22); }
.social-bubble:focus-visible { outline: 3px solid #4b8dd1; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .social-bubble { transition: none; } }

/* Translucent glass cards let the animated page background show through. */
.project-card {
  background-color: rgba(255, 255, 255, .72);
  border-color: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.project-card:hover {
  background-color: rgba(255, 255, 255, .86);
  border-color: rgba(255, 255, 255, .95);
}

/* Use the existing abstract artwork beneath the animated navy wash. */
body {
  background-image:
    linear-gradient(125deg, rgba(255,255,255,.28) 0%, rgba(237,242,248,.18) 28%, rgba(25,56,95,.24) 68%, rgba(16,23,34,.22) 82%, rgba(255,255,255,.18) 100%),
    url('Background4.jpg');
  background-size: 320% 320%, cover;
  background-position: 0% 50%, center center;
  background-repeat: no-repeat;
  background-attachment: fixed, fixed;
}
@keyframes navy-background-flow {
  0% { background-position: 0% 50%, center center; }
  50% { background-position: 100% 50%, center center; }
  100% { background-position: 0% 50%, center center; }
}
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    background-position: center center, center center;
  }
}

/* Light gray glass surface for stronger contrast over the image background. */
.project-card {
  background-color: rgba(239, 243, 248, .88);
  border-color: rgba(255, 255, 255, .9);
}
.project-card:hover {
  background-color: rgba(248, 250, 252, .96);
}
.footer {
  margin: 48px auto 16px;
  padding: 30px 28px 24px;
  text-align: center;
}
.footer-note {
  max-width: 560px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: .96rem;
}
.footer-meta {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(23,43,77,.12);
  color: #68778b;
  font-size: .82rem;
}
@media (max-width: 600px) {
  .footer { margin-top: 34px; padding: 24px 18px 20px; }
}
