:root {
  --cg-ink: #123047;
  --cg-deep-ocean: #075985;
  --cg-ocean: #0284c7;
  --cg-sky: #38bdf8;
  --cg-seafoam: #dff6f7;
  --cg-sand: #f7f4ed;
  --cg-white: #ffffff;
  --cg-border: #cde4ee;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--cg-ink);
  font-family: monospace;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.28), transparent 35%),
    radial-gradient(circle at bottom left, rgba(2, 132, 199, 0.16), transparent 40%),
    linear-gradient(135deg, #eaf8fc 0%, #dff6f7 50%, #f7f4ed 100%);
}

/* Navigation */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  background: rgba(7, 89, 133, 0.96);
  border-bottom: 3px solid var(--cg-sky);
  box-shadow: 0 3px 14px rgba(18, 48, 71, 0.18);
}

.logo {
  margin: 0;
  color: var(--cg-white);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.navbar > a {
  text-decoration: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar a {
  color: var(--cg-white);
  font-family: monospace;
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
}

.nav-list a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 20px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--cg-sky);
  text-decoration: none;
  transform: translateY(-2px);
}

/* General layout */

main {
  width: min(1120px, 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0 auto;
  padding: 42px 24px 64px;
}

.page-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 18px 0 36px;
  color: var(--cg-deep-ocean);
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  text-align: center;
}

.page-title::after {
  content: "";
  width: 65px;
  height: 4px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--cg-ocean),
    var(--cg-sky),
    var(--cg-seafoam)
  );
}

/* Homepage image */

.home-image {
  display: block;
  width: 350px;
  max-width: 100%;
  align-self: center;
  margin: 0 auto 32px;
  padding: 7px;
  background: var(--cg-white);
  border: 1px solid var(--cg-border);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(18, 48, 71, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-image:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 0 16px 30px rgba(18, 48, 71, 0.2);
}

/* Portfolio cards */

.project {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 42px;
  padding: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--cg-border);
  border-top: 5px solid var(--cg-sky);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(18, 48, 71, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project:nth-of-type(even) {
  border-top-color: var(--cg-ocean);
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(18, 48, 71, 0.18);
}

.item-link {
  width: 65%;
  overflow: hidden;
  border-radius: 10px;
}

.project-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2048 / 600;
  object-fit: contain;
  border-radius: 10px;
  background: #eaf8fc;
  transition: transform 0.3s ease;
}

.item-link:hover .project-image {
  transform: scale(1.04);
}

.project-details {
  display: flex;
  width: 35%;
  padding: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(145deg, #ffffff, #effbff);
  border: 1px solid #e3f3f8;
  border-radius: 10px;
  line-height: 1.6;
  text-align: center;
}

.project-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--cg-sky);
  color: var(--cg-deep-ocean);
  font-size: 1.25rem;
}

.project-name::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cg-sky);
}

.project-details a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cg-deep-ocean);
  padding: 4px 0;
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
}

.project-details a::after {
  content: "→";
}

.project-details a:hover {
  color: var(--cg-ocean);
  text-decoration: underline;
}

/* About page */

.about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--cg-border);
  border-top: 5px solid var(--cg-sky);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(18, 48, 71, 0.1);
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  display: block;
  width: min(300px, 100%);
  padding: 5px;
  background: var(--cg-white);
  border: 1px solid var(--cg-border);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(18, 48, 71, 0.15);
}

.about-text {
  flex: 1;
}

.about-text h2,
.resume h2 {
  color: var(--cg-deep-ocean);
  font-family: Georgia, serif;
}

.about-text p {
  line-height: 1.65;
}

/* Resume */

.resume {
  padding: 28px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--cg-border);
  border-radius: 14px;
  line-height: 1.65;
}

/* Buttons */

.button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background-color: var(--cg-deep-ocean);
  color: var(--cg-white);
  font-family: monospace;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(18, 48, 71, 0.14);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover,
input[type="submit"]:hover {
  background-color: var(--cg-ocean);
  transform: translateY(-2px);
}

/* Contact form */

form {
  width: min(500px, 100%);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--cg-border);
  border-top: 5px solid var(--cg-sky);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(18, 48, 71, 0.1);
}

form input[type="submit"] {
  align-self: flex-start;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--cg-deep-ocean);
  font-family: Georgia, serif;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  margin-bottom: 18px;
  padding: 11px;
  border: 1px solid var(--cg-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--cg-ink);
  font: inherit;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(56, 189, 248, 0.35);
  border-color: var(--cg-ocean);
}

/* Footer */

.footer,
footer {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 12px 20px;
  background-color: var(--cg-ink);
  border-top: 4px solid var(--cg-sky);
  color: var(--cg-white);
  text-align: center;
}
.contact-card {
  width: min(650px, 100%);
  align-self: center;
  justify-content: center;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--cg-white);
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 5px 12px rgba(18, 48, 71, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 18px rgba(18, 48, 71, 0.2);
}

.instagram {
  background: linear-gradient(135deg, #c13584, #f77737);
}

.linkedin {
  background: #0a66c2;
}

.github {
  background: var(--cg-ink);
}