/* Theme variables */
:root {
  --accent: #38bdf8;
  --accent-strong: #22d3ee;
  --muted: #93a4c3;
  --bg: #060b1d;
  --card: rgba(12, 18, 38, 0.9);
  --glass: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
}

/* Base reset */
* {
  box-sizing: border-box;
}

/* Global styles */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  margin: 0;
  color: #e6eef8;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.08), transparent 32%),
              radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.08), transparent 30%),
              linear-gradient(180deg, #060b1d 0%, #0a132c 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Glow accent on scroll; fixed so it stays put while content moves */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px at 50% 0%, rgba(56, 189, 248, 0.08), transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
  background: rgba(6,11,29,0.75);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo .mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
}

nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  font-weight: 600;
  color: #dbeafe;
}

.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #041024;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.25);
}

.container {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 20px;
}

/* Hero layout */
.hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto; /* sidebar sizes to its content on laptop */
  gap: 28px;
  align-items: center; /* vertically center main content and sidebar relative to each other */
}

/* Card styles */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(2,6,23,0.6);
  border: 1px solid var(--border);
}

h1 {
  font-size: 32px;
  margin: 0 0 8px;
}

h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
}

.sub {
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.6;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* Skill pill */
.chip {
  background: var(--glass);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: #dbeafe;
  border: 1px solid rgba(255,255,255,0.08);
}

.profile-card {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  align-self: center; /* center vertically in the grid row */
  justify-self: start; /* align with the start of the adjacent container on laptop */
  gap: 4px;
  width: fit-content;
  min-width: 280px;
  max-width: 340px;
  height: fit-content; /* hug contents so there are no empty areas */
  margin: 0; /* prevent centering so it lines up with the main column */
}

/* Circular avatar container */
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* Image inside avatar */
.avatar img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  display: block;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

p {
  line-height: 1.7;
}

/* Link rows inside profile card for tidy grouping */
.link-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.outline {
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 10px;
  color: #dbeafe;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

section {
  margin-top: 36px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-foot {
  margin-top: 14px;
}

/* Project cards */
.project-card {
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  min-height: 140px;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.project-link {
  font-weight: 700;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 36px rgba(2,6,23,0.5);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

.project-row h4 {
  margin: 0 0 6px;
}

.project-row p {
  margin: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.project-cta {
  white-space: nowrap;
  align-self: center;
}

footer {
  margin: 50px 0 80px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 18px;
}

.muted {
  color: var(--muted);
}

.mb12 {
  margin-bottom: 12px;
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Project detail pages */
.breadcrumbs {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 18px;
  align-items: center;
}

.detail-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  color: #dbeafe;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

input, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
  background: transparent;
  color: inherit;
  margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 900px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  nav {
    order: 3;
    width: 100%;
    gap: 10px;
    flex-direction: column;
  }

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

  .profile-card {
    order: -1;
    max-width: 340px;
    margin: 0 auto;
  }

  .page-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .card {
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .link-row {
    flex-direction: column;
  }

  .link-row .outline {
    width: 100%;
    text-align: center;
  }

  .project-row {
    flex-direction: column;
    align-items: stretch;
  }

  .project-cta {
    align-self: flex-start;
  }
}

@media (max-width: 780px) {
  nav a {
    width: 100%;
    text-align: center;
  }

  .btn {
    text-align: center;
    width: 100%;
  }

  header {
    display: none;
  }
}
