/* ---------- Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-gradient);
  transition: background 0.25s ease, color 0.25s ease;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.15), transparent 28%),
              radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.12), transparent 26%);
  pointer-events: none;
  z-index: 0;
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --accent: #f59e0b;
  --navy: #1a1a2e;
  --light: #f8fafc;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #475569;
  --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --shadow: rgba(17, 24, 39, 0.08);
}

body[data-theme='dark'] {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --accent: #fbbf24;
  --navy: #0f172a;
  --light: #020817;
  --card: #111827;
  --text: #e5eefb;
  --muted: #cbd5e1;
  --bg-gradient: linear-gradient(180deg, #020817 0%, #111827 100%);
  --surface: #111827;
  --surface-alt: #0f172a;
  --shadow: rgba(15, 23, 42, 0.5);
}

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

/* ---------- Header / Nav ---------- */
header {
  background-color: var(--navy);
  padding: 1rem 2rem;
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.12);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 0.08em;
}

.logo::before {
  content: "SK";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 10px 18px rgba(79, 70, 229, 0.35);
  animation: logoPulse 3s ease-in-out infinite;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.theme-toggle {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.04);
  background: rgba(255, 255, 255, 0.15);
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

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

/* ---------- Sections ---------- */
section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

#about {
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeUp 0.8s ease both;
}

.about-copy {
  text-align: left;
  animation: fadeUp 0.9s ease both;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.profile-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 12px 30px rgba(26, 26, 46, 0.12);
  animation: floatHero 6s ease-in-out infinite;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--navy);
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.25rem;
  color: var(--navy);
}

p {
  font-size: 1.05rem;
  color: var(--muted);
}

#contact a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}

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

/* ---------- Project Grid (updated) ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 0;
  box-shadow: 0 8px 20px var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 28px rgba(17, 24, 39, 0.12);
}

.project-card h3 {
  margin-bottom: 0.5rem;
  color: var(--navy);
  font-size: 1.3rem;
}

.project-media {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-card-body {
  padding: 1.5rem;
}

.project-visual {
  position: relative;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.project-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.55));
  pointer-events: none;
}

.project-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-card-body {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, 0.8));
  color: #fff;
  padding: 1.5rem;
}

.project-card-body h3,
.project-card-body p,
.project-card-body .tag {
  color: #fff;
}

.project-card-body p {
  margin-bottom: 0.8rem;
}

.project-card-body .tag {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.view-project-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 700;
}

.contact-card {
  max-width: 700px;
  margin: 2rem auto 0;
  background: var(--card);
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 12px 24px var(--shadow);
  text-align: left;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--navy);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font: inherit;
  background: var(--surface-alt);
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(79, 70, 229, 0.2);
  border-color: var(--primary);
}

.contact-links {
  border-top: 1px solid rgba(79, 70, 229, 0.12);
  padding-top: 1rem;
}

.page-header {
  text-align: center;
  padding-top: 3rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.about-page-layout {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto 0;
  text-align: left;
}

.about-page-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card {
  max-width: 700px;
  margin: 2rem auto 0;
  background: var(--card);
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 12px 24px var(--shadow);
  text-align: left;
}

.contact-card p {
  margin-bottom: 1rem;
}

.projects-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.large-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tag {
  display: inline-block;
  margin-top: 1rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.cta-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.view-project-btn:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25);
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.secondary-btn:hover {
  background: rgba(79, 70, 229, 0.08);
}

.cta-panel {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 12px 24px var(--shadow);
}

.contact-panel {
  max-width: 980px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 10px 20px var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-link-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px var(--shadow);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(245, 158, 11, 0.12));
  font-size: 1.4rem;
}

.contact-link-item strong,
.contact-link-item small {
  display: block;
}

.contact-link-item strong {
  color: var(--navy);
  margin-bottom: 0.1rem;
}

.contact-link-item small {
  color: var(--muted);
}

.cv-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* ---------- Skills ---------- */
.skills-list {
  list-style: none;
}

.skills-list li {
  display: inline-block;
  background: #1a1a2e;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  margin: 0.3rem;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .theme-toggle {
    margin-top: 0.25rem;
  }

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

  .about-page-layout,
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-page-copy,
  .contact-card {
    text-align: center;
  }

  .about-copy {
    text-align: center;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
  }

  .cta-row {
    justify-content: center;
  }

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

  section {
    padding: 3rem 1rem;
  }
}

@keyframes floatHero {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 10px 18px rgba(79, 70, 229, 0.35);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06), 0 14px 22px rgba(79, 70, 229, 0.45);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #1a1a2e;
  color: #fff;
}
