* {
  box-sizing: border-box;
}

:root {
  --bg: #0b1220;
  --surface: #111a2e;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #4f8cff;
  --border: #1f2a44;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #0b1220, #0f172a);
  color: var(--text);
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: 1150px;
  margin: auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
}

.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 6rem;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
}

.hero p {
  margin-top: 2rem;
  font-size: 1.3rem;
  color: var(--muted);
  max-width: 700px;
}

h2 {
  font-size: 2.8rem;
  margin-bottom: 2.5rem;
}

p {
  font-size: 1.2rem;
  line-height: 1.8;
}

.navbar {
  position: fixed;
  width: 100%;
  backdrop-filter: blur(14px);
  background: rgba(11,18,32,0.8);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  flex-wrap: nowrap;
  gap: 1rem;
}


.logo {
  font-weight: 700;
  font-size: 1.2rem;
  transition: 0.3s ease;
  cursor: pointer;
  text-decoration: none;   /* remove underline */
  color: var(--text);      /* force correct color */
}

.logo:visited {
  color: var(--text);      /* prevent purple visited state */
}

.logo:hover {
  letter-spacing: 1px;
  color: var(--accent);    /* optional subtle hover effect */
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.nav-links a {
  margin-left: 0;
  text-decoration: none;
  font-size: 1rem;
  color: var(--muted);
}

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

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.btn-primary, .btn-outline {
  padding: 1rem 1.8rem;
  border-radius: 12px;
  text-decoration: none;
  margin-right: 1rem;
  font-weight: 600;
  transition: 0.3s;
}

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

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

.btn-outline {
  border: 1px solid var(--border);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(6px);
  padding: 1rem 1.8rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
}

.divider {
  height: 100px;
  background: linear-gradient(180deg, transparent, #0f172a);
}

.shape-divider {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.shape-divider svg {
  position: absolute;
  width: 100%;
  height: 100%;
  fill: #0f1c33; /* darker than background for contrast */
}

.timeline {
  position: relative;
  padding-left: 3rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  margin-bottom: 4rem;
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -9px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
}

.timeline-content span {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
}

.timeline-content ul {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--muted);
}

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

.skill-card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  transition: 0.3s;
}

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

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  transition: 0.35s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
}

.project-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.project-card span {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.section-subtext {
  margin-bottom: 3rem;
  color: var(--muted);
  font-size: 1.2rem;
}

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

.website-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  transition: 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.website-card img {
  max-height: 60px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.website-card span {
  color: var(--text);
  font-weight: 600;
}

.website-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--accent);
  width: 0%;
  z-index: 200;
}

.contact-section {
  padding: 8rem 0;
  text-align: center;
}

.contact-section h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.contact-subtext {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 4rem;
}

/* ONE unified block */
.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 3rem;
  max-width: 1000px;
  margin: auto;
}

/* individual items */
.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  padding: 1.5rem;
  border-radius: 16px;
  transition: 0.35s ease;
}

.contact-item:hover {
  background: rgba(255,255,255,0.03);
  transform: translateY(-5px);
}

.contact-icon {
  width: 55px;
  height: 55px;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.contact-title {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.contact-text {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* RESPONSIVE FIX */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .section {
    padding: 6rem 0;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.active {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 900px) {
  .nav-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links a {
    font-size: 0.95rem;
  }

  .hero {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 2rem;
  }

  .timeline {
    padding-left: 2rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  .contact-item {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .shape-divider {
    height: 70px;
  }

  h2 {
    font-size: 2.2rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 6.5vw, 3.2rem);
    line-height: 1.2;
  }

  .hero p {
    font-size: 1.1rem;
    margin-top: 1.5rem;
  }

  .hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
  }

  .btn-primary, .btn-outline {
    width: 100%;
    text-align: center;
    margin-right: 0;
  }

  .cta-group {
    display: grid;
    gap: 1rem;
  }

  .skills-grid,
  .projects-grid,
  .website-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .skill-card,
  .website-card {
    padding: 2rem;
  }

  .website-card img {
    max-height: 48px;
  }
}

@media (max-width: 680px) {
  .timeline {
    border-left: 0;
    padding-left: 0;
  }

  .timeline-dot {
    display: none;
  }

  .timeline-item {
    margin-bottom: 1.8rem;
  }

  .timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.6rem;
  }
}

@media (max-width: 640px) {
  .nav-links {
    justify-content: center;
    row-gap: 0.75rem;
    font-size: 0.95rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    width: 14px;
    height: 14px;
    left: -7px;
  }

  .timeline-content ul {
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 1.1rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  .contact-section h2 {
    font-size: 2.2rem;
  }

  .contact-wrapper {
    padding: 1.5rem;
  }

  .contact-item {
    padding: 1.2rem;
  }

  .contact-item {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .contact-icon {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
}

.github-icon svg {
  color: white;
}

footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
