:root {
  --bg-color: #fdfcf9;
  --surface-color: #ffffff;
  --text-main: #1c1b1a;
  --text-muted: #575653;
  --border-color: #e6e4df;
  --accent: #001ddb;
  --nav-bg: rgba(253, 252, 249, 0.95);
  --modal-bg: rgba(253, 252, 249, 0.98);
  --hover-bg: #f0eee9;
  --shadow: rgba(0, 0, 0, 0.04);
  --scrollbar-thumb: #d1cdc7;
  --scrollbar-thumb-hover: #b5b1a9;
  --scrollbar-track: transparent;
}

/*#d96c4a*/
[data-theme="dark"] {
  --bg-color: #111110;
  --surface-color: #1a1917;
  --text-main: #f0ede8;
  --text-muted: #8a8680;
  --border-color: #2a2826;
  --accent: #6677e9;
  --nav-bg: rgba(17, 17, 16, 0.95);
  --modal-bg: rgba(17, 17, 16, 0.98);
  --hover-bg: #222120;
  --shadow: rgba(0, 0, 0, 0.2);
  --scrollbar-thumb: #3a3836;
  --scrollbar-thumb-hover: #4a4846;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

h1,
h2,
h3,
.serif {
  font-family: "Newsreader", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-main);
  transition: color 0.3s ease;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: none;
  transition: background 0.3s ease;
}

nav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(160, 32, 240, 0.3) 20%,
    rgba(160, 32, 240, 0.8) 50%,
    rgba(160, 32, 240, 0.3) 80%,
    transparent
  );
}

.nav-logo {
  font-size: 2rem;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-logo-img {
  height: 6rem;
  width: auto;
}

.nav-logo-dark {
  display: none;
}

.nav-logo-light {
  margin-right: -1rem;
}

[data-theme="dark"] .nav-logo-light {
  display: none;
}

[data-theme="dark"] .nav-logo-dark {
  display: inline;
  filter: invert(1);
  height: 6rem;
  margin-right: -1rem;
}

.nav-logo:hover {
  color: var(--text-main);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s, filter 0.2s;
  display: inline-block;
}

.nav-links a:hover {
  color: var(--text-main);
  transform: scale(1.12);
  filter: brightness(1.4);
}

.contact-btn {
  position: relative;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 100px;
  border: 2px solid var(--accent);
  transition: color 0.4s ease, border-radius 0.4s ease, background-color 0.4s ease, transform 0.2s, filter 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.contact-btn::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--accent);
  z-index: -1;
  transition: height 0.4s ease;
}

.contact-btn:hover {
  color: var(--bg-color);
  border-radius: 4px;
  transform: scale(1.08);
  filter: brightness(1.3);
}

.contact-btn:hover::before {
  height: 100%;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.3s, transform 0.2s, filter 0.2s;
  padding: 0;
  color: var(--text-muted);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--hover-bg);
  color: var(--text-main);
  transform: rotate(15deg) scale(1.15);
  filter: brightness(1.4);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  transition: opacity 0.2s, transform 0.3s;
}

.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

.container {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 30px;
}

header.hero {
  padding: 200px 0 60px 0;
  position: relative;
}

header.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(160, 32, 240, 0.3) 20%,
    rgba(160, 32, 240, 0.8) 50%,
    rgba(160, 32, 240, 0.3) 80%,
    transparent
  );
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.1;
  margin: 0 0 20px 0;
}

.hero p {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin: 0;
  font-family: "Newsreader", serif;
  font-weight: 300;
  transition: color 0.3s ease;
}

.team-btn {
  margin-top: 30px;
  background: var(--accent);
  color: var(--bg-color);
  border: none;
  padding: 12px 24px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.3s ease, color 0.3s ease;
}

.team-btn:hover {
  opacity: 0.85;
}

section {
  padding: 80px 0;
  border-top: none;
  position: relative;
  transition: color 0.3s ease;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(160, 32, 240, 0.3) 20%,
    rgba(160, 32, 240, 0.8) 50%,
    rgba(160, 32, 240, 0.3) 80%,
    transparent
  );
}

section h2 {
  font-size: 2.5rem;
  margin-top: 0;
  margin-bottom: 30px;
}

section p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  font-weight: 300;
  transition: color 0.3s ease;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease;
}

td {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

td:first-child {
  color: var(--text-muted);
  width: 35%;
  border-right: 1px solid var(--border-color);
}

tr:last-child td {
  border-bottom: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.model-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 40px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.model-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.model-card:hover::before {
  transform: scaleY(1);
}

.model-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.card-title {
  font-family: "Newsreader", serif;
  font-size: 2rem;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
}

.card-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

.blog-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.sort-btn {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 4px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s, border-color 0.3s, color 0.3s;
}

.sort-btn:hover {
  background: var(--hover-bg);
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface-color);
  padding: 24px 28px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.3s, transform 0.2s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.blog-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.blog-item:hover::before {
  transform: scaleY(1);
}

.blog-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.blog-content {
  flex: 1;
  min-width: 0;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  transition: color 0.3s;
}

.blog-title {
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.blog-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 300;
  line-height: 1.6;
  transition: color 0.3s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
}

.blog-item:hover .blog-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.blog-arrow svg {
  width: 20px;
  height: 20px;
}

#modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-bg);
  display: flex;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 100px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

#modal-overlay::-webkit-scrollbar {
  width: 6px;
}

#modal-overlay::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

#modal-overlay::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

#modal-overlay::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

#modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#modal-window {
  width: 100%;
  max-width: 800px;
  background: transparent;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

#modal-overlay.active #modal-window {
  transform: translateY(0);
}

#close-modal {
  position: fixed;
  top: 50px;
  left: 60px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s, transform 0.2s;
}

#close-modal:hover {
  color: var(--text-main);
  transform: translateX(-5px);
}

.modal-title {
  font-family: "Newsreader", serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-main);
}

.modal-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-content {
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text-muted);
  font-weight: 300;
}

.modal-content.blog-post {
  max-width: 680px;
}

.modal-content.blog-post strong {
  color: var(--text-main);
  font-weight: 500;
}

.modal-content.blog-post div[style*="text-align: right"] {
  margin-top: 40px;
  font-size: 0.95rem;
}

.modal-content.blog-post em {
  font-style: italic;
  color: var(--accent);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
}

.team-sections {
  margin-top: 20px;
}

.team-section {
  padding-bottom: 20px;
}

.team-section-divider {
  height: 1px;
  background: var(--border-color);
  margin: 30px 0;
}

.team-section-title {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px 0;
}

.team-section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.team-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--text-main);
}

.team-member-num {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-width: 24px;
}

.team-member-link {
  font-size: 0.95rem;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}

.team-member-link:hover {
  color: var(--accent);
}

.team-member-login {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.team-view-all-wrapper {
  padding-top: 10px;
  padding-bottom: 40px;
}

.team-view-all {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--surface-color);
  border: 1px dashed var(--border-color);
  text-decoration: none;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.3s;
  margin-bottom: 20px;
}

.team-view-all:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.team-view-all span {
  font-size: 0.9rem;
  font-weight: 500;
}

.secret-form {
  max-width: 600px;
}

.secret-section {
  padding: 20px 0;
}

.secret-divider {
  height: 1px;
  background: var(--border-color);
  margin: 10px 0;
}

.secret-field {
  margin-bottom: 16px;
}

.secret-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.secret-field input,
.secret-field textarea,
.secret-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--surface-color);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.secret-field input:focus,
.secret-field textarea:focus,
.secret-field select:focus {
  outline: none;
  border-color: var(--accent);
}

.secret-field input[readonly] {
  background: var(--hover-bg);
  cursor: not-allowed;
}

.secret-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.secret-btn:hover {
  opacity: 0.85;
}

.secret-btn-danger {
  background: #dc3545;
}

.secret-btn-danger:hover {
  background: #c82333;
}


footer {
  padding: 60px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  border-top: none;
  margin-top: 60px;
  position: relative;
  transition: color 0.3s;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(160, 32, 240, 0.3) 20%,
    rgba(160, 32, 240, 0.8) 50%,
    rgba(160, 32, 240, 0.3) 80%,
    transparent
  );
}


@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero h1 {
    font-size: 3rem;
  }
  section {
    padding: 60px 0;
  }
  
  td {
    display: block;
    width: 100% !important;
    border-right: none !important;
  }


  td:first-child {
    border-bottom: none;
    padding-bottom: 5px;
    font-weight: 500;
    color: var(--text-main);
  }
  td:last-child {
    padding-top: 5px;
  }
  .team-grid {
    gap: 6px;
  }
}


/* ── Torch / cursor spotlight ── */
.torch-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  transition: opacity 0.4s ease;
  background: none;
}

[data-theme="dark"] .torch-overlay {
  background: radial-gradient(
    circle 220px at var(--tx, -999px) var(--ty, -999px),
    rgba(160, 32, 240, 0.18) 0%,
    rgba(120, 0, 200, 0.08) 40%,
    transparent 70%
  );
}

/* ── Page reveal animations ── */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav {
  animation: fadeSlideUp 0.7s ease both;
  animation-delay: 0s;
}

.hero h1 {
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 0.25s;
}

.hero p {
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 0.65s;
}

.team-btn {
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 1.05s;
}

#research {
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 1.4s;
}

#projects {
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 1.7s;
}

#blogs {
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 2.0s;
}

footer {
  animation: fadeSlideUp 0.8s ease both;
  animation-delay: 2.3s;
}
