/* =========================================
   Variables & Reset
   ========================================= */
:root {
  --bg: #000000;
  --text: #ffffff;
  --text-dim: #888888;
  --accent: #333333;
  --highlight: #ffffff;
  --font-main: "Inter", sans-serif;
  /* Terminal Colors */
  --term-color: #33ff00;
  --term-bg: rgba(0, 0, 0, 0.95);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

a:hover {
  border-bottom-color: var(--text);
  opacity: 0.8;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================
   Navigation
   ========================================= */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.nav-links a {
  border: none;
  color: var(--text-dim);
}

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

.lang-switcher {
  display: flex;
  gap: 10px;
}

.lang-btn {
  background: transparent;
  border: 1px solid #333;
  color: var(--text-dim);
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
  background-color: #fff;
  color: #000;
  border-color: #fff;
}

/* =========================================
   Hero Content
   ========================================= */
.hero {
  padding: 100px 0;
  text-align: left;
}

h1 {
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin: 0 0 40px 0;
  text-transform: uppercase;
  word-wrap: break-word;
}

.subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-dim);
  font-weight: 400;
  line-height: 1.3;
  max-width: 800px;
  margin-bottom: 60px;
  letter-spacing: -0.02em;
}

/* Social Row */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 80px;
}

.social-pill {
  background-color: #111;
  border: 1px solid #333;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: none; /* Override default link style */
  display: inline-flex;
  align-items: center;
}

.social-pill:hover {
  background-color: #fff;
  color: #000;
  border-color: #fff;
  border-bottom: none;
}

/* =========================================
   Sections
   ========================================= */
section {
  padding: 80px 0;
  border-top: 1px solid #1a1a1a;
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 40px 0;
}

/* Project Cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
}

.project-card {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  padding: 30px;
  transition: transform 0.2s;
}

.project-card:hover {
  border-color: #fff;
  background: #111;
}

.project-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.project-tech {
  font-family: monospace;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.project-desc {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 20px;
}

.project-link {
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #fff;
}

/* Research List */
.research-list {
  list-style: none;
  padding: 0;
}

.research-list li {
  margin-bottom: 30px;
  padding-left: 20px;
  border-left: 2px solid #333;
}

.highlight {
  color: #fff;
  font-weight: 700;
}

p {
  color: var(--text-dim);
}

/* Skills/Competencies Tag Cloud */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.skill-tag {
  background: #111;
  border: 1px solid #333;
  padding: 8px 16px;
  font-size: 14px;
  color: #aaa;
}

/* About Image */
.profile-lockup {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%; /* Modern circle */
  object-fit: cover;
  filter: grayscale(100%);
  flex-shrink: 0;
}

.footer {
  padding: 80px 0;
  text-align: center;
  font-size: 14px;
  color: #444;
  border-top: 1px solid #1a1a1a;
}

.footer a {
  color: #666;
  border-bottom-color: #333;
}

/* Utility */
.hidden {
  display: none;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
  .profile-lockup {
    flex-direction: column;
  }
  .nav-links {
    display: none; /* Simplify for mobile, handled by JS if needed */
  }
  nav {
    justify-content: center;
    flex-direction: column;
    gap: 20px;
  }
}

/* =========================================
   404 Page / Centered Layouts
   ========================================= */
.layout-centered {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.layout-centered h1 {
  font-size: clamp(8rem, 25vw, 15rem); /* Massive 404 text */
  line-height: 0.8;
  margin: 0;
}

.layout-centered h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-transform: uppercase;
  margin: 20px 0;
}

.layout-centered p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

.home-button {
  display: inline-block;
  background-color: #fff;
  color: #000;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 100px;
  transition: transform 0.2s, opacity 0.2s;
  border-bottom: none;
}

.home-button:hover {
  opacity: 0.9;
  transform: scale(1.02);
  border-bottom: none;
}

.footer-links {
  margin-top: 50px;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

.system-msg {
  font-family: monospace;
  background: #111;
  border: 1px solid #333;
  padding: 15px;
  margin-top: 40px;
  color: #666;
  font-size: 14px;
  text-align: left;
  display: inline-block;
}

/* =========================================
   Interactive Terminal
   ========================================= */
#terminal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  font-family: "Courier New", Courier, monospace;
  padding: 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#terminal-overlay.hidden {
  display: none;
}

.terminal-output {
  color: var(--term-color);
  white-space: pre-wrap;
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.5;
  text-shadow: 0 0 5px var(--term-color);
}

.terminal-input-line {
  display: flex;
  align-items: center;
  color: var(--term-color);
  font-size: 16px;
}

.terminal-prompt {
  margin-right: 10px;
  font-weight: bold;
}

#terminal-input {
  background: transparent;
  border: none;
  color: var(--term-color);
  font-family: inherit;
  font-size: inherit;
  flex-grow: 1;
  outline: none;
  text-shadow: 0 0 5px var(--term-color);
}

.terminal-hint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #111;
  color: #444;
  padding: 5px 10px;
  font-family: monospace;
  font-size: 12px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0.5;
}

/* Floating Terminal Trigger */
.terminal-trigger {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #fff;
  color: #000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10000;
  font-family: inherit;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
  transition: transform 0.2s, background-color 0.2s;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.terminal-trigger:hover {
  transform: scale(1.1);
  background-color: #eee;
}

@media (max-width: 768px) {
  .terminal-trigger {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
}
