:root {
  --bg: #f4f7fd;
  --surface: #ffffff;
  --surface-strong: #0d213f;
  --primary: #1c55ff;
  --primary-dark: #1443cc;
  --text: #121a2b;
  --muted: #64718f;
  --border: rgba(16, 52, 96, 0.12);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

img {
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(16, 52, 96, 0.08);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--surface-strong);
  text-decoration: none;
  font-size: 1rem;
}

.brand img {
  width: auto;
  max-height: 100px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
  
  .nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
  }
  
  .hamburger {
    display: none;
    border: none;
    background: transparent;
    padding: 0.5rem;
    cursor: pointer;
  }
  
  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--surface-strong);
    margin: 4px 0;
    background: var(--surface-strong);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  
  .hamburger.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 3.35rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.hero {
  padding: 4rem 0 2rem;
  background: linear-gradient(180deg, #0f234f 0%, #102c5f 48%, #162f66 100%);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-subtitle {
  margin: 0 0 1rem;
  color: #bdd1ff;
  font-weight: 500;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.05;
  max-width: 11ch;
}

.hero-text {
  max-width: 32rem;
  margin: 1.25rem 0 1.75rem;
  color: #dbe3ff;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
}

.primary-btn {
  background: #2965ff;
  color: #fff;
}

.secondary-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}

.hero-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: #bfd1ff;
  font-size: 0.95rem;
}

.hero-contact-row a {
  color: #c7d8ff;
  text-decoration: none;
  opacity: 0.88;
}

.hero-contact-row a:hover {
  opacity: 1;
  text-decoration: underline;
}

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

.profile-card {
  width: 100%;
  max-width: 360px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 32px 60px rgba(0, 14, 44, 0.16);
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  background: linear-gradient(135deg, #1e5dff 0%, #0f2f66 100%);
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.profile-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.18), transparent 45%);
}
.image-placeholder {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  text-align: center;
  padding: 1rem;
}

.project-image-placeholder {
  height: 180px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}

.profile-details {
  color: #fff;
}

.profile-name {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 700;
}

.profile-role {
  margin: 0 0 1rem;
  color: #a8c2ff;
}

.section {
  padding: 3rem 0;
}

.section-alt {
  background: #eef3fb;
}

.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2rem;
}

.section-heading h2 {
  margin-bottom: 0.9rem;
  font-size: 2rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.summary-grid,
.services-grid,
.experience-grid,
.tech-grid,
.portfolio-grid,
.bottom-grid {
  display: grid;
  gap: 1.5rem;
}

.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-card,
.service-card,
.experience-card,
.project-card,
.info-block,
.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.75rem;
}

.summary-card h3,
.service-card h3,
.experience-card h3 {
  margin-top: 0;
}

.experience-card h3 a {
  color: var(--surface-strong);
  text-decoration: none;
}

.experience-card h3 a:hover,
.experience-card h3 a:focus {
  color: var(--primary);
}

.summary-card ul,
.experience-card ul,
.info-block ul {
  padding-left: 1.2rem;
  margin: 1rem 0 0;
}

.summary-card li,
.experience-card li,
.info-block li {
  margin-bottom: 0.65rem;
}

.services-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.service-card {
  min-height: 220px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  padding: 2rem;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(16, 52, 96, 0.08);
  box-shadow: 0 24px 48px rgba(16, 52, 96, 0.06);
}

.service-icon-placeholder,
.service-icon-link {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: transparent;
  border: none;
}

.service-icon-placeholder {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.service-icon-link img,
.service-card .service-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.service-card h3 {
  margin: 0;
  margin-top: 0.15rem;
  font-size: 1.05rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.experience-slider {
  overflow: hidden;
  width: min(100%, calc(3 * 360px + 3rem));
  margin: 0 auto;
}

.experience-grid {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.6s ease;
  width: max-content;
}

.experience-card {
  flex: 0 0 360px;
  min-width: 360px;
}

@media (max-width: 1280px) {
  .experience-card {
    flex: 0 0 calc((100% - 3rem) / 3);
    min-width: calc((100% - 3rem) / 3);
  }
}

@media (max-width: 980px) {
  .nav-container {
    flex-direction: row;        /* logo left, hamburger right — always one row */
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    position: relative;
  }
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(16, 52, 96, 0.15);
  border-radius: 12px;
  background: #fff;
  padding: 0;
  gap: 2px;
  flex-shrink: 0;
  cursor: pointer;
}
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(16, 52, 96, 0.08);
    box-shadow: 0 20px 40px rgba(16, 52, 96, 0.07);
    z-index: 11;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    display: block;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: #f4f7fd;
    font-weight: 500;
  }
  .cta-button {
    display: none;
  }
}
.experience-card span {
  display: inline-flex;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.tech-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

.tech-group {
  background: #ffffff;
  border: 1px solid rgba(16, 52, 96, 0.08);
  border-radius: 28px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(16, 52, 96, 0.06);
  display: grid;
  gap: 1rem;
}

.tech-group-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--surface-strong);
}

.tech-group-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.tech-icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--surface-strong);
  box-shadow: none;
  border: 1px solid rgba(16, 52, 96, 0.12);
}

.tech-icon-pill img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.portfolio-grid {
  grid-template-columns: repeat(4, minmax(300px, 340px));
  gap: 1rem;
  justify-content: center;
  width: max-content;
  margin: 0 auto;
}

.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 260px;
  border-radius: 24px;
  border: 1px solid rgba(16, 52, 96, 0.08);
  box-shadow: 0 24px 48px rgba(16, 52, 96, 0.08);
  background: #000;
}

.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 20, 54, 0) 50%, rgba(9, 20, 54, 0.75) 100%);
  pointer-events: none;
}

.project-card-label {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(12, 21, 55, 0.78);
  color: #fff;
  font-weight: 700;
  text-align: left;
}

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

.contact-intro {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.8;
}

.contact-block h2 {
  margin-top: 0;
}

.contact-block form {
  display: grid;
  gap: 1rem;
}

.contact-block label {
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-block input,
.contact-block textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(16, 52, 96, 0.15);
  border-radius: 16px;
  background: #f9fbff;
  color: var(--text);
  font: inherit;
}

.contact-block button {
    width: 100%;
    max-width: 320px;
  background: var(--primary);
  color: #fff;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-status {
  margin: 0;
  color: var(--surface-strong);
  font-weight: 600;
}

@media (max-width: 980px) {
  .nav-container {
    position: relative;
  }
  .brand img {
    max-height: 58px;
  }
  .hamburger {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(16, 52, 96, 0.08);
    box-shadow: 0 20px 40px rgba(16, 52, 96, 0.07);
    z-index: 11;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: #f4f7fd;
  }
  .cta-button {
    display: none;
  }
  .hero-grid,
  .summary-grid,
  .services-grid,
  .experience-grid,
  .portfolio-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    gap: 1.5rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions a {
    width: 100%;
    max-width: 100%;
  }
  .hero-contact-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  .experience-slider {
    width: 100%;
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    width: 100%;
    margin: 0 auto;
  }
  .hero {
    padding-top: 3rem;
  }
}

@media (max-width: 680px) {
  .nav-container {
    flex-direction: row;        /* ADD THIS — overrides the column direction */
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
  }
  .hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(16, 52, 96, 0.15);
    border-radius: 12px;
    background: #fff;
    gap: 5px;
    flex-shrink: 0;
  }
  .cta-button {
    display: none;             /* hide the CTA on small screens */
  }
  .hero-actions a {
    padding: 0.95rem 1rem;
  }
  .hero-card {
    justify-content: stretch;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero-text {
    max-width: 100%;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .contact-block button {
    max-width: none;
  }
  .tech-grid {
    grid-template-columns: 1fr;
  }
  .service-card,
  .experience-card,
  .project-card,
  .summary-card {
    padding: 1.5rem;
  }
}