/* Base styles */
:root {
  --bg: #f9f9f9;
  --text: #333;
  --muted: #666;
  --brand: #00bfff;
  --brand-dark: #0052a3;
  --surface: #ffffff;
  --surface-alt: #f3f7fa;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  transition: background 0.3s, color 0.3s;
}

a {
  color: #0066cc;
  text-decoration: none;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 12px;
  width: auto;
  height: auto;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
}

/* Navbar */
header {
  background: #222;
  color: #fff;
  padding: 0;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #00bfff;
  text-align: left;
  text-shadow: 0 2px 12px rgba(0,191,255,0.10);
  font-family: 'Segoe UI', 'Montserrat', 'Arial', sans-serif;
  margin-right: 24px;
  background: linear-gradient(90deg, #00bfff 40%, #0052a3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  justify-self: flex-start;
  align-self: center;
  padding: 0;
  line-height: 1;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 4%;
  background: #222;
  min-height: 44px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
  font-family: 'Segoe UI', 'Montserrat', 'Arial', sans-serif;
}

.nav-links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin-left: auto;
  font-family: inherit;
}

.nav-links li a {
  color: #fff;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 7px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  font-size: 0.98rem;
  letter-spacing: 0.3px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: #00bfff;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,191,255,0.13);
  text-decoration: none;
}

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  margin-left: auto;
  cursor: pointer;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s ease;
}
.nav-toggle-label span { position: relative; }
.nav-toggle-label span::before { position: absolute; top: -7px; }
.nav-toggle-label span::after { position: absolute; top: 7px; }

/* Hamburger for mobile */
@media (max-width: 800px) {
  .navbar {
    flex-wrap: wrap;
    padding: 10px 4vw;
    min-height: 40px;
  }
  .logo {
    font-size: 1.1rem;
    margin-right: 0;
  }
  .nav-toggle-label { display: block; }
  .nav-links {
    flex-direction: column;
    background: #181818;
    position: absolute;
    top: 60px;
    right: 0;
    width: 180px;
    padding: 20px 0;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 0 0 0 18px;
    z-index: 999;
    gap: 0;
    margin-left: 0;
  }
  .nav-links li {
    margin: 12px 0;
    text-align: right;
    padding-right: 24px;
  }
  .nav-links li a {
    display: block;
    width: 100%;
    padding: 10px 0 10px 18px;
    border-radius: 0 22px 22px 0;
    font-size: 1.08rem;
  }
  /* Show menu when toggled */
  #nav-toggle:checked + .nav-toggle-label + .nav-links { display: flex; }
}

/* Hero Section */
.hero-section {
  background: 
    linear-gradient(120deg, #1f242b 0%, #31363e 100%),
    url('images/tech-grid.png') repeat;
  background-blend-mode: overlay;
  animation: techMove 60s linear infinite;
  padding: 40px 0 40px 0;
  min-height: auto;
  margin-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  color:white;
}

.hero-section::before {
  background: rgba(0,0,0,0.48);
}

/* remove boxed panel */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  grid-template-areas: 'text visual';
  gap: 36px;
  align-items: center;
}
.hero-text { text-align: left; grid-area: text; }
.hero-visual { display: flex; justify-content: center; grid-area: visual; }
.hero-text h1 { font-size: 3rem; margin-bottom: 12px; }
.hero-text h2 { font-size: 1.35rem; margin-bottom: 14px; color: #e0f2ff; }
.hero-text p { font-size: 1.08rem; max-width: 640px; margin-bottom: 22px; }

/* larger, cleaner text */
.highlight { color: var(--brand); }

/* tighten button spacing */
.cta-button {
  display: inline-block;
  border: none;
  background: linear-gradient(90deg, var(--brand) 60%, var(--brand-dark) 100%);
  color: #fff;
  padding: 10px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
  margin-top: 0;
  margin-bottom: 0;
}

.cta-button:hover {
  background: linear-gradient(90deg, #0052a3 60%, #00bfff 100%);
  transform: translateY(-2px) scale(1.04);
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-button.secondary {
  background: transparent;
  color: #fff;
  border: 2px solid var(--brand);
}
.cta-button.secondary:hover {
  background: var(--brand);
}

/* Section */
.section {
  padding: 60px 0;
  background: var(--bg);
}

.section:nth-child(even) {
  background: var(--surface-alt);
}

.section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: #111;
  letter-spacing: 1px;
}

/* About & Skills Tags */
.skills-list {
  margin-top: 18px;
  text-align: center;
}

.skill-tag {
  display: inline-block;
  background: #e0f7fa;
  color: #007c91;
  border-radius: 18px;
  padding: 6px 16px;
  margin: 6px 6px 0 0;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

.skill-tag:hover {
  background: #b2ebf2;
}

/* Skills Bars */
.skills-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.skills-category {
  flex: 1 1 320px;
  min-width: 260px;
}

.skills-category h3 {
  margin-bottom: 18px;
  color: #00bfff;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-item span {
  font-size: 1rem;
  font-weight: 500;
  color: #222;
}

.skill-bar {
  background: #e0e0e0;
  border-radius: 10px;
  height: 10px;
  width: 100%;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #00bfff 60%, #0052a3 100%);
  transition: width 0.7s;
}

.skill-level.other {
  background: linear-gradient(90deg, #ffb347 60%, #ffcc33 100%);
}

/* Experience Timeline */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 20px;
}

.experience-item {
  background: #fff;
  border-left: 5px solid #00bfff;
  border-radius: 8px;
  padding: 22px 28px;
  box-shadow: 0 2px 12px rgba(0,191,255,0.07);
  position: relative;
}

.experience-date {
  font-size: 0.98rem;
  color: #00bfff;
  font-weight: 600;
  margin-bottom: 6px;
}

.experience-company {
  font-size: 1rem;
  color: #0052a3;
  font-weight: 500;
  margin-bottom: 4px;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 30px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 0 0 18px 0;
}
.filter-btn {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-weight: 600;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--brand);
  color: #fff;
}

.project-card {
  background: linear-gradient(120deg, #232526 0%, #414345 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,191,255,0.10), 0 1.5px 8px rgba(0,0,0,0.09);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
  color: #fff;
  position: relative;
}

.project-card:hover {
  transform: translateY(-7px) scale(1.025);
  box-shadow: 0 16px 48px rgba(0,191,255,0.18), 0 3px 16px rgba(0,0,0,0.13);
}

.project-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: grayscale(10%) brightness(0.95);
  border-bottom: 2px solid #00bfff;
}

.project-info {
  padding: 22px 20px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-info h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  color: #00bfff;
  font-weight: 700;
}

.project-info p {
  font-size: 0.98rem;
  margin-bottom: 15px;
  color: #e0e0e0;
}

.project-tags {
  margin-bottom: 15px;
}

.project-tag {
  display: inline-block;
  background: #1a2634;
  color: #00bfff;
  border-radius: 20px;
  padding: 5px 12px;
  margin-right: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid #00bfff;
}

.cta-button {
  display: inline-block;
  border: none;
  background: linear-gradient(90deg, #00bfff 60%, #0052a3 100%);
  color: #fff;
  padding: 10px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
  margin-top: 0;
  margin-bottom: 0;
}

.cta-button:hover {
  background: linear-gradient(90deg, #0052a3 60%, #00bfff 100%);
  transform: translateY(-2px) scale(1.04);
}

/* Contact */
#contact .container {
  text-align: center;
}

.mail-button {
  display: inline-block;
  background: linear-gradient(90deg, #00bfff 60%, #0052a3 100%);
  color: #fff;
  padding: 12px 26px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 18px;
  margin-top: 10px;
  transition: background 0.3s, transform 0.2s;
}

.mail-button:hover {
  background: linear-gradient(90deg, #0052a3 60%, #00bfff 100%);
  transform: translateY(-2px) scale(1.04);
}

.social-links {
  margin-top: 18px;
}

.social-link {
  display: inline-block;
  margin: 0 10px;
  color: #00bfff;
  font-size: 1.5rem;
  transition: color 0.2s, transform 0.2s;
}

.social-link:hover {
  color: #0052a3;
  transform: scale(1.15);
}
.profile-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 6px solid var(--brand);
  box-shadow: 0 10px 30px rgba(0,191,255,0.18);
  background: #fff;
  box-sizing: border-box;
}
.profile-photo img {
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

/* Footer */
footer {
  background: #181818;
  color: #aaa;
  text-align: center;
  padding: 22px 0 10px 0;
  font-size: 0.98rem;
}

.made-with-love {
  color: #00bfff;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.heart {
  color: #ff4d6d;
  font-size: 1.2em;
}

/* Responsive Design */
@media (max-width: 1000px) {
  .skills-container {
    flex-direction: column;
    gap: 28px;
  }
}

@media (max-width: 700px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: 'visual' 'text'; gap: 24px; }
  .hero-text { text-align: center; }
  .hero-section {
    padding: 40px 0 20px 0;
  }
}

@media (max-width: 500px) {
  .profile-photo { width: 150px; height: 150px; border-width: 5px; margin: 0 auto; }
  .profile-photo img { object-position: center 42%; }

  .hero-content h1 {
    font-size: 1.5rem;
  }
  .hero-content h2 {
    font-size: 1rem;
  }
  .section h2 {
    font-size: 1.2rem;
  }
  .project-info h3 {
    font-size: 1rem;
  }
  .skills-category h3 {
    font-size: 1rem;
  }
}

/* --- DARK MODE --- */
body.dark-mode {
  --bg: #181c22;
  --text: #e0e0e0;
  --surface: #23272f;
  --surface-alt: #1a1d23;
  --brand: #00e6ff;
  background: var(--bg);
  color: var(--text);
}

body.dark-mode header,
body.dark-mode .navbar {
  background: #181c22;
  color: #fff;
}

body.dark-mode .section {
  background: var(--surface);
}

body.dark-mode .section:nth-child(even) {
  background: var(--surface-alt);
}

/* Ensure section headings are legible in dark mode */
body.dark-mode .section h2 {
  color: #e8f6ff;
}

body.dark-mode .skills-category h3,
body.dark-mode .project-info h3,
body.dark-mode .made-with-love {
  color: #00e6ff;
}

body.dark-mode .skill-tag {
  background: #1a2634;
  color: #00e6ff;
}

body.dark-mode .skills-grid .skill-item span {
  color: #e0e0e0;
}

body.dark-mode .skill-bar {
  background: #23272f;
}

body.dark-mode .skill-level {
  background: linear-gradient(90deg, #00e6ff 60%, #0052a3 100%);
}

body.dark-mode .skill-level.other {
  background: linear-gradient(90deg, #ffd700 60%, #ffb347 100%);
}

body.dark-mode .experience-item {
  background: #23272f;
  border-left: 5px solid #00e6ff;
  box-shadow: 0 2px 12px rgba(0,230,255,0.07);
}

body.dark-mode .experience-company {
  color: #00e6ff;
}

body.dark-mode .project-card {
  background: linear-gradient(120deg, #181c22 0%, #23272f 100%);
  color: #e0e0e0;
  box-shadow: 0 8px 32px rgba(0,230,255,0.10), 0 1.5px 8px rgba(0,0,0,0.13);
}

body.dark-mode .project-img img {
  filter: grayscale(10%) brightness(0.85);
  border-bottom: 2px solid #00e6ff;
}

body.dark-mode .project-tag {
  background: #23272f;
  color: #00e6ff;
  border: 1px solid #00e6ff;
}

body.dark-mode .cta-button,
body.dark-mode .mail-button {
  background: linear-gradient(90deg, #00e6ff 60%, #0052a3 100%);
  color: #fff;
}

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.show { opacity: 1; transform: none; }

body.dark-mode .cta-button:hover,
body.dark-mode .mail-button:hover {
  background: linear-gradient(90deg, #0052a3 60%, #00e6ff 100%);
}

body.dark-mode .social-link {
  color: #00e6ff;
}

body.dark-mode .social-link:hover {
  color: #0052a3;
}

body.dark-mode footer {
  background: #181c22;
  color: #aaa;
}

/* Optional: Dark mode toggle button style */
/* Navbar dark mode toggle button */
.dark-toggle-item { display: flex; align-items: center; }
#dark-mode-toggle {
  background: transparent;
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
#dark-mode-toggle:hover { background: var(--brand); color: #fff; }
body.dark-mode #dark-mode-toggle { border-color: #00e6ff; color: #00e6ff; }
body.dark-mode #dark-mode-toggle:hover { background: #00e6ff; color: #23272f; }
