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

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #3d5a80;
  --accent-soft: #e8eef5;
  --border: #e4e2dc;
  --shadow: 0 8px 30px rgba(26, 26, 26, 0.06);
  --radius: 16px;
  --max: 960px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

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

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

ul {
  list-style: none;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 246, 243, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--accent);
}

/* ===== Layout ===== */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section {
  padding: 4rem 0 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
  padding: 4.5rem 0 2rem;
  min-height: calc(100vh - 70px);
}

.hero-label {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

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

.hero-quote {
  font-size: 1.15rem;
  color: var(--muted);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 1.75rem;
  max-width: 28ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-photo-wrap {
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 24px rgba(61, 90, 128, 0.16);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.45s ease, box-shadow 0.45s ease;
}

.hero-photo.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-photo.is-visible:hover {
  transform: translateY(0) scale(1.06);
  box-shadow: 0 16px 36px rgba(61, 90, 128, 0.28);
}

.hero-text {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #334d6e;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface);
}

.btn-github {
  background: var(--text);
  color: #fff;
  margin-top: 0.25rem;
}

.btn-github:hover {
  background: #333;
}

.btn-github svg {
  width: 16px;
  height: 16px;
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}

.project-image {
  background: var(--accent-soft);
  min-height: 200px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
}

.project-shots {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1.65fr 1fr;
  gap: 2px;
  aspect-ratio: 8 / 5;
  background: var(--border);
}

.project-image.project-shots img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #0a0b0f;
}

.shot-home {
  grid-column: 1 / -1;
  grid-row: 1;
}

.shot-discover {
  grid-column: 1;
  grid-row: 2;
}

.shot-library {
  grid-column: 2;
  grid-row: 2;
}

.shot-signup {
  grid-column: 3;
  grid-row: 2;
}

.projects-more {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.project-shots-cashflow {
  grid-template-columns: 1.65fr 1fr;
  grid-template-rows: 1.55fr 0.9fr;
  gap: 2px;
  background: #fff;
}

.project-image.project-shots-cashflow img {
  background: #1e2430;
}

.shot-app {
  grid-column: 1 / -1;
  grid-row: 1;
}

.shot-entry {
  grid-column: 1;
  grid-row: 2;
}

.shot-delete {
  grid-column: 2;
  grid-row: 2;
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.project-body p {
  color: var(--muted);
  font-size: 0.95rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-stack li {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ===== Skills ===== */
.skills-group {
  margin-bottom: 1.5rem;
}

.skills-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(26, 26, 26, 0.03);
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.skill-chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.skill-icon svg {
  width: 16px;
  height: 16px;
}

/* ===== Education ===== */
.education-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.education-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}

.education-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.education-date {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.education-degree {
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.education-coursework-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.coursework-list {
  display: grid;
  gap: 0.4rem;
}

.coursework-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--text);
  font-size: 0.95rem;
}

.coursework-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===== About ===== */
.about-text {
  max-width: 62ch;
}

.about-text p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ===== Contact ===== */
.contact-box {
  background: linear-gradient(145deg, #ffffff 0%, var(--accent-soft) 100%);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(61, 90, 128, 0.08);
}

.contact-intro {
  color: var(--muted);
  margin-bottom: 1.4rem;
  max-width: 42ch;
  position: relative;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  position: relative;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.contact-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(61, 90, 128, 0.1);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
}

.contact-link-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.contact-link-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem 2.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer-note {
  margin-bottom: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-bottom: 0.85rem;
}

.footer-links a {
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.82rem;
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.5rem;
    text-align: center;
  }

  .hero-quote {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

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

  .hero-photo-wrap {
    order: -1;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }

  .nav-links {
    font-size: 0.82rem;
    gap: 0.3rem 0.75rem;
    justify-content: flex-end;
  }
}
