:root {
  /* Colors - Dark Ocean Theme */
  --bg: #0a1128;
  --text: #e8f1f5;
  --text-muted: #7ea8be;
  --border: #1e3a5f;
  --card-bg: #132742;
  --accent: #00d4ff;
  --accent-hover: #00b8e6;

  /* Gradients */
  --gradient-start: #034078;
  --gradient-mid: #0582ca;
  --gradient-end: #1282a2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
  padding-left: 80px; /* Space for side navbar */
  transition: all 0.3s ease;
}

/* Prevent text overflow on all devices */
.hero-value,
.hero-intro,
.about-content,
.timeline-content,
.project-desc,
.contact-intro {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

/* Enhanced Focus Styles for Keyboard Navigation */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.side-menu a:focus-visible {
  outline-offset: -3px;
}

/* Skip link enhancement */
.skip-link:focus {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
}

/* Section Titles */
.section-title {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 3rem;
  letter-spacing: -1px;
}

/* Main Content Container */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

main > section:first-child {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
  width: 100%;
}

/* Section Spacing */
section {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

/* Side Navigation Bar */
.side-nav {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  backdrop-filter: blur(10px);
}

.side-nav:hover {
  width: 200px;
  box-shadow: 2px 0 20px rgba(0, 212, 255, 0.1);
}

.side-nav-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 0;
}

/* Logo in Sidebar */
.side-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  margin-bottom: 2rem;
  cursor: pointer;
  text-decoration: none;
}

.logo-design {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.side-nav:hover .logo-design {
  font-size: 1.2rem;
  gap: 0.4rem;
}

.logo-bracket,
.logo-slash {
  color: var(--accent);
}

.logo-bracket {
  font-size: 0.85rem;
}

.side-nav:hover .logo-bracket {
  font-size: 1.4rem;
}

.logo-text {
  letter-spacing: -0.5px;
}

.logo-slash {
  font-size: 0.8rem;
}

.side-nav:hover .logo-slash {
  font-size: 1.3rem;
}

/* Side Menu Items */
.side-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.5rem;
}

.side-menu a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.side-menu a .icon {
  font-size: 1.6rem;
  min-width: 24px;
  text-align: center;
  transition: transform 0.3s ease;
}

.side-menu a .label {
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  font-size: 1rem;
}

.side-nav:hover .side-menu a .label {
  opacity: 1;
  transform: translateX(0);
}

.side-menu a:hover {
  background: var(--card-bg);
  color: var(--text);
}

.side-menu a:hover .icon {
  transform: scale(1.2);
}

/* Active Menu Item */
.side-menu a.active {
  color: var(--accent);
  background: linear-gradient(
    90deg,
    rgba(0, 212, 255, 0.1) 0%,
    transparent 100%
  );
}

.side-menu a.active::before {
  content: '';
  position: absolute;
  left: 0;
  inset-block: 0;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 0 1rem;
  align-items: center;
  justify-content: space-between;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-logo .logo-design {
  font-size: 1.1rem;
}

/* Mobile Menu Open State */
body.menu-open .side-nav {
  transform: translateX(0);
}

body.menu-open {
  overflow: hidden;
}

.hero {
  padding: 6rem 2rem 4rem; /* Reduced padding */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem; /* Reduced gap */
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--gradient-start) 0%,
    var(--gradient-mid) 50%,
    var(--gradient-end) 100%
  );
  margin: 0 -2rem;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

/* Hero Background Overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(0, 212, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(0, 130, 202, 0.2) 0%,
      transparent 50%
    );
  pointer-events: none;
}

/* Hero Left Side - Text Content */
.hero-text {
  padding: 0 0 0 2rem;
  position: relative;
  z-index: 1;
  max-width: 550px;
}

.hero-text > div {
  margin-bottom: 2rem;
}

.hero-label {
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.7rem;
  font-weight: 600;
}

.hero-value {
  font-size: 1.2rem;
  color: #fff;
  font-weight: 400;
  line-height: 1.3;
}

/* Hero Signature Logo */
.hero-signature {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 2rem;
  margin: 2.5rem 0 2rem;
  color: #fff;
}

.hero-signature .logo-bracket,
.hero-signature .logo-slash {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.hero-signature .logo-bracket {
  font-size: 2.2rem;
}

.hero-signature .logo-slash {
  font-size: 2.1rem;
}

.hero-signature .logo-text {
  letter-spacing: -0.5px;
}

.hero-greeting {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero-name {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -3px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

/* Hero Right Side - Image & Intro */
.hero-image-wrapper {
  position: relative;
  text-align: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  box-shadow: 0 10px 40px rgba(0, 212, 255, 0.4);
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  max-width: 450px;
  text-align: center;
}

.hero-cta {
  color: #fff;
  margin-top: 0.8rem;
  font-weight: 500;
}

.hero-cta a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  transition: all 0.3s;
}

.hero-cta a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

/* About Section */
.about-content {
  max-width: 900px;
  font-size: 1.2rem;
  line-height: 1.9;
  color: var(--text-muted);
}

/* Career Timeline */
.timeline {
  max-width: 1100px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-year {
  font-size: 1.3rem;
  font-weight: 600;
  padding-top: 0.2rem;
}

.timeline-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Tech Stack Section */
.tech-intro {
  max-width: 900px;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 4rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
  max-width: 1100px;
}

.tech-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
}

.tech-icon-img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.tech-name {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
}

.project-image {
  height: 180px;
  background: linear-gradient(
    135deg,
    var(--gradient-start) 0%,
    var(--gradient-mid) 50%,
    var(--gradient-end) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.project-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 60%
  );
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.project-desc {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Project Tech Badges */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.tech-badge {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Project Links */
.project-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.project-link:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
  transform: translateX(5px);
}

/* Contact Section */
.contact-intro {
  max-width: 900px;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  gap: 1.2rem;
  max-width: 600px;
  font-size: 1.05rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
}

.contact-label {
  font-weight: 700;
  min-width: 140px;
}

.contact-value {
  color: var(--text-muted);
}

.contact-value a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: opacity 0.2s;
}

.contact-value a:hover {
  opacity: 0.8;
}

/* Tech Stack Cards */
.tech-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s,
    background 0.2s;
}

.tech-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
  background: linear-gradient(
    135deg,
    var(--card-bg) 0%,
    rgba(5, 130, 202, 0.1) 100%
  );
}

/* Project Cards */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.3);
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-hover) 100%
  );
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-top:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.5);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Tablet & Medium Screens (max-width: 968px) */
@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 4rem 1.5rem 3rem;
    min-height: auto;
    margin: 0 -1.5rem; /* Match main padding */
  }

  .hero-text {
    text-align: center;
    max-width: 100%;
    padding-left: 0;
  }

  .hero-text > div {
    margin-bottom: 1.5rem;
  }

  .hero-image {
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
  }

  .hero-name {
    font-size: 3rem;
    letter-spacing: -2px;
  }

  .hero-signature {
    font-size: 1.6rem;
    margin: 2rem 0 1.5rem;
    justify-content: center;
  }

  .timeline-item {
    grid-template-columns: 80px 1fr;
    gap: 2rem;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Coming Soon Project Cards */
.project-card-coming-soon {
  opacity: 0.85;
  border: 2px dashed var(--border);
}

.project-card-planning {
  opacity: 0.7;
  border: 2px dashed var(--border);
}

.project-image-coming-soon {
  background: linear-gradient(135deg, #1e3a5f 0%, #132742 100%);
}

.project-image-emoji {
  font-size: 4rem;
}

.project-status-badge {
  color: var(--accent);
  font-size: 0.75em;
  display: block;
  margin-top: 0.5rem;
  font-weight: 500;
}

.project-status-text {
  color: var(--text-muted);
  font-style: italic;
}

/* Call to Action Section */
.cta-section {
  text-align: center;
  margin-top: 4rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.cta-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.cta-description {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.cta-button-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.cta-button-secondary {
  background: transparent;
  color: var(--accent);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--accent);
  transition: all 0.3s ease;
  display: inline-block;
}

.cta-button-secondary:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* Force 3 columns on desktop */
@media (min-width: 968px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  body {
    padding-left: 0;
    padding-top: 60px;
    font-size: 16px;
  }

  .mobile-header {
    display: flex;
  }

  .side-nav {
    transform: translateX(-100%);
    width: 250px;
    transition: transform 0.3s ease;
  }

  .side-nav:hover {
    width: 250px;
  }

  .side-menu a .label {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Small Mobile (max-width: 640px) */
@media (max-width: 640px) {
  .hero-name {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  /* Better email handling on mobile */
  .hero-value {
    font-size: 0.95rem;
    word-break: break-all;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  main {
    padding: 0 1rem;
  }

  /* 1 column on mobile */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Better project links on mobile */
  .project-links {
    flex-direction: column;
    gap: 1rem;
  }
}
