
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
/*@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');*/
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500&display=swap');


:root {
  --bg: #f3f4f6;
  --text: #020617;
  --accent: #2563eb;       
  --subtle: #64748b;
  --card-bg: #ffffff;
  --shadow: rgba(15, 23, 42, 0.12);
  --transition: 0.25s ease;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}

header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  padding: 0.75rem 5vw;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
  color: var(--text);
}

header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #ced7d7, #d4d6da, #bcc5c9);
  opacity: 0.7;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: 1rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  margin: 4px 0;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}


/* Course grouping */
.course-group {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}


.course-group + .course-group {
  margin-top: 1.5rem;
}


.course-group-title {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;

 
  background: linear-gradient(120deg, #1b2b4f, #2563eb, #38bdf8);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}


.course-group-title::after {
  content: "";
  display: block;
  height: 2px;
  width: 72px;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c1c3, #2563eb, #38bdf8);
  opacity: 0.75;
}


.course-group .course-list-inline {
  margin-top: 0.25rem;
}


.course-group .course-list-inline li {
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.course-group .course-list-inline li:hover {
  border-color: rgba(37, 99, 235, 0.35);
}





#education .course-title {
  display: inline-block;

  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.28rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  background: linear-gradient(
    120deg,
    #0f172a 0%,
    #2563eb 28%,
    #38bdf8 44%,
    rgba(255, 255, 255, 0.95) 52%,
    #38bdf8 60%,
    #2563eb 78%,
    #0f172a 100%
  );
  background-size: 240% 100%;
  background-position: 0% 50%;

  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

#education .course-title::after {
  content: "";
  display: block;
  height: 2px;
  width: 84px;
  margin-top: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c1c3, #2563eb, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.22);
  opacity: 0.9;
}


/* END of course grouping*/


.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition), opacity var(--transition);
}


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

.nav-icon {
  width: 24px;
  height: 24px;
  display: block;
  border-radius: 999px;
  filter: grayscale(1) brightness(1.05);
  opacity: 0.9;
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-icon:hover {
  filter: grayscale(0) brightness(1.1);
  opacity: 1;
  transform: translateY(-1px);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition), opacity var(--transition);
}


.tunnel-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-left: 0.5rem;
}

.pulse-led {
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: pulse 1.2s infinite;
  box-shadow: 0 0 8px var(--accent);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

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



section h2 {
  margin-bottom: 1.5rem; 
}

/* Cards */
section {
  padding: 4rem 2rem;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

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

.card {
  background-color: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  border-color: rgba(37, 99, 235, 0.2);
}

h1, h2, h3 {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.7rem;
  font-weight: 600;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  line-height: 1.6;
}

#experience > h2,
#projects > h2,
#contact > h2,
.section-title {
  font-size: 1.6rem;          
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;

  background: linear-gradient(120deg, #1b2b4f, #152f68, #2e2be6);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}



.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card-content p {
  color: var(--subtle);
  margin-bottom: 1rem;
}

.view-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
  transition: background var(--transition);
}

.view-button:hover {
  background-color: #1e40af;
}

/* Footer */
.site-footer {
  position: relative;
  background: #f9fafb;
  width: 100%;
  padding: 1.75rem 2rem;
  margin: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  color: var(--subtle);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, #22c1c3, #2563eb, #38bdf8);
  opacity: 0.7;
}

.footer-left {
  font-size: 0.9rem;
}

.footer-right {
  display: flex;
  gap: 0.75rem;
}

.footer-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px; /* make them round */
  display: block;
  filter: grayscale(1) brightness(1.05);
  opacity: 0.9;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.45),
    0 10px 20px rgba(15, 23, 42, 0.25);
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-icon:hover {
  filter: grayscale(0) brightness(1.1);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.6),
    0 14px 28px rgba(15, 23, 42, 0.35);
}



/* Loading Screen */
#loader {
  background: white;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  position: fixed;
  top: 0;
  left: 0;
}

.nmos-animation {
  background: white;
  text-align: center;
  padding: 2rem;
}

.nmos-animation svg {
  display: block;
  margin: auto;
}

/* pulse animation */
.gate-pulse {
  animation: dropPulse 2.5s infinite;
  transform: translate(130px, 10px);
}

@keyframes dropPulse {
  0%   { transform: translate(130px, 10px); opacity: 0; }
  20%  { transform: translate(130px, 40px); opacity: 1; }
  40%  { transform: translate(130px, 80px); opacity: 1; }
  60%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Signal pulse animation from source to drain */
.source-drain-pulse {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: flowPulse 2.5s ease-out infinite;
  animation-delay: 1.25s;
}

@keyframes flowPulse {
  0%   { stroke-dashoffset: 220; opacity: 0; }
  30%  { stroke-dashoffset: 110; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

.loader-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin-top: 0.5rem;
  color: #444;
}

@media (max-width: 768px) {
  header {
    padding: 0.5rem 5vw;
    backdrop-filter: blur(10px) saturate(1.3);
    -webkit-backdrop-filter: blur(10px) saturate(1.3);
  }

  .navbar {
    padding: 0;
  }

  .logo {
    font-size: 1.1rem;
    gap: 0.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-right {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-top: none;
    padding: 0.75rem 1.5rem 1rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    z-index: 998;
  }

  .nav-right.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links a {
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0.01em;
  }

  .nav-icons {
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem;
  }

  section {
    scroll-margin-top: 80px;
  }
}


.typewriter {
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  color: var(--subtle);
}

.typewriter h1 {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(120deg, #0f172a, #2563eb, #38bdf8);

  /* gradient text */
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  white-space: nowrap;
  overflow: hidden;
}



.typewriter p {
  font-size: 1.05rem;
  color: var(--subtle);
  white-space: normal;
  overflow: visible;
}


.cursor {
  display: inline-block;
  margin-left: 5px;
  color: var(--accent);
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

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


/* Hero Section */
#hero {
  padding: 4rem 0;               
  margin: 0;                     
  max-width: none !important;   
  width: 100%;
  background-color: #ffffff;
  position: relative; 
}

/* Gradient divider under biography section */
#hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #ced7d7, #d4d6da, #bcc5c9);
  opacity: 0.7;
}


.profile-pic {

  width: 230px;
  height: auto;
  aspect-ratio: 2000 / 2396;   
  display: block;
  object-fit: cover;


  border-radius: 26px;          

  padding: 10px;              
  background:
    radial-gradient(circle at 0% 0%, rgba(38, 184, 247, 0.45), transparent 75%),
    radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.25), transparent 55%),
    linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.6);


  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}




.hero-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.hero-text {
  flex: 1;
  min-width: 250px;
}

.hero-text p {
  color: var(--subtle);
  font-size: 1.1rem;
}

#education {
  margin-top: 4rem;
}

.education-entry {
  margin-bottom: 2.5rem;
}

.degree-block {
  margin-bottom: 1.5rem;
}

.degree-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.degree-subtext {
  font-size: 1rem;
  color: var(--subtle);
  margin-bottom: 1rem;
}

.course-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}

.course-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-list-inline li {
  background-color: #f1f5f9;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.course-list-inline li a {
  color: var(--accent);
  text-decoration: none;
}

.course-list-inline li:hover {
  background-color: #e2e8f0;
}

#email-link {
  color: var(--accent);
  font-weight: 600;
}

.copy-button {
  margin-left: 0.75rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.9rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.copy-button:hover {
  background-color: #1e40af;
}

.copy-confirmation {
  margin-left: 0.5rem;
  font-size: 0.85rem;
  color: green;
  display: none;
}

.hex-ticker {
  margin-left: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 1rem;
  font-weight: bold;
  animation: fadeHex 0.8s ease-in-out infinite alternate;
}

@keyframes fadeHex {
  from { opacity: 1; }
  to { opacity: 0.6; }
}

.binary-led-row {
  display: flex;
  gap: 6px;
  margin-left: 1rem;
}

.led-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #1f2937; /* Off */
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.led-dot.on {
  background-color: var(--accent); /* On */
  box-shadow: 0 0 6px var(--accent);
}


