/* Base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f7f7fb;
  --bg-alt: #ffffff;
  --text: #222222;
  --text-muted: #555555;
  --accent: #1f6feb;
  --accent-soft: rgba(31, 111, 235, 0.1);
  --border: #e0e0ea;
  --radius-lg: 18px;
  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.12);
  --max-width: 960px;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(247, 247, 251, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo a {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.main-nav a:hover {
  background-color: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.main-nav .active {
  background-color: var(--accent-soft);
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  margin: 0.2rem 0 0.5rem;
}

.hero-subtitle {
  margin: 0;
  max-width: 40rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-content > h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
}

.section-content > p {
  max-width: 44rem;
  color: var(--text-muted);
}

/* Cards */
.card-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
  margin-top: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.15rem;
  font-size: 1.1rem;
}

.card .meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.1rem 0;
}

.card ul {
  padding-left: 1.2rem;
  margin-top: 0.6rem;
}

.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.skills-grid h3 {
  margin-top: 0;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background-color: var(--accent-soft);
  font-size: 0.86rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.1s ease, border-color 0.18s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(31, 111, 235, 0.25);
}

.btn-primary:hover {
  background-color: #164db0;
  box-shadow: 0 14px 30px rgba(31, 111, 235, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--accent);
  border-color: var(--accent-soft);
}

.btn-secondary:hover {
  background-color: var(--accent-soft);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background-color: #ffffff;
}

/* Contact page */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr);
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.contact-form {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.contact-details {
  font-size: 0.95rem;
}

.contact-details ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.contact-details li {
  margin-bottom: 0.4rem;
}

.contact-details a {
  color: var(--accent);
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 1.75rem;
  background-color: #ffffff;
}

.footer-content {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content a {
  color: var(--accent);
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (min-width: 720px) {
  .hero {
    padding-top: 4.5rem;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: flex-start;
  }

  .card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Optional: keep text container named for clarity */
.hero-text {
  max-width: 40rem;
}

.hero-photo {
  max-width: 220px;
  align-self: center;
}

.hero-photo img {
  width: 100%;
  height: auto;
  border-radius: 999px; /* circular photo */
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  border: 3px solid #ffffff;
}

/* On larger screens, show text and photo side by side */
@media (min-width: 720px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-photo {
    max-width: 260px;
    align-self: flex-start;
  }
}
