/* styles.css */

@font-face {
    font-family: 'Necto Mono'; /*a name to be used later*/
    src: url('fonts/necto-mono-main/fonts/NectoMono-Regular.otf'), url(fonts/necto-mono-main/fonts/NectoMono-Regular.woff2); /*URL to font*/
}

:root {
  --main: #22273a;
  --card: #20283a;
  --bg: #0a192f;
  --sidebar: #112240;
  --accent: #5ec3b3;
  --text: #ccd6f6;
  --light-text: #8892b0;
  --muted: #8ca1c6;
  --card-bg: #1e2c41;
  --card-text: #e6eaf3;
}

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

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  font-family: 'Necto Mono', monospace;
  background-color: var(--bg);
  color: var(--text);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 80px;
  height: 100vh;
  background-color: var(--sidebar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1rem;
}

.sidebar .logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2rem;
}

.sidebar nav a {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--bg);
  background-color: var(--text);
}

.sidebar nav a span {
  font-size: 0.7rem;
  margin-top: 0.3rem;
}

/* Main content */
main {
  margin-left: 80px;
  width: calc(100% - 80px);
}

section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

/* Hero */
#hero {
  background-color: var(--bg);
}

.typewriter {
  overflow: hidden;
  white-space: nowrap;
  margin: 0 auto;
  font-size: 3rem;
  border-right: 0.15em solid var(--accent);
  animation: typing 3s steps(30, end),
             blink-caret 1s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to   { width: 15ch; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50%      { border-color: var(--accent); }
}

.subtitle {
  margin-top: 1rem;
  color: var(--light-text);
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text);
}

/* About */
.about {
  text-align: left;
}

.about p {
  max-width: 1000px;
  color: var(--light-text);
}

.about b {
  color: var(--text);
}

/* Grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1000px;
}

/* Project cards */
.project-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background-color: var(--card);
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.18s;
}

.project-front,
.project-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.23s;
  border-radius: 1.25rem;
}

.project-front {
  z-index: 1;
}

.project-back {
  flex-direction: column;
  background-color: var(--card-bg);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  text-align: center;
  padding: 1.3rem 1.1rem;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.2px;
  color: var(--text);
}

.project-back .project-title {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--accent);
}

.project-back p {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  color: var(--card-text);
}

.project-links a {
  display: inline-block;
  padding: 0.38rem 1.2rem;
  margin: 0 0.18rem;
  font-size: 0.96rem;
  font-weight: 600;
  background-color: var(--accent);
  color: var(--bg);
  border-radius: 2rem;
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}

.project-links a:hover {
  color: #fff;
}

.project-card:hover .project-front {
  opacity: 0;
}

.project-card:hover .project-back {
  opacity: 1;
  pointer-events: auto;
}

/* Social links */
.social-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

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

.social-links i {
  font-size: 2rem;
}

.social-links span {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--light-text);
}

/* Work experience / timeline */
#work-experience {
  background-color: var(--bg);
  color: var(--text);
}

.panel-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
}

#work-experience h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 2.5rem;
  color: var(--text);
}

.timeline {
  position: relative;
  margin-left: 24px;
  padding-left: 16px;
  border-left: 2.5px solid var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 2.2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  position: absolute;
  left: -31px;
  width: 1.7rem;
  height: 1.7rem;
  font-size: 1.5rem;
  background-color: var(--card-bg);
  border: 2.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 40%;
}

.timeline-content {
  text-align: left;
}

.timeline-content h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-content h3 span {
  margin-left: 0.4rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.timeline-location,
.timeline-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.1rem 0 0.2rem;
  font-size: 0.97rem;
  color: var(--text);
}

/* Achievements */
.achievements {
  background-color: var(--card-bg);
  border-radius: 1.2rem;
  margin: 1rem 0 0.4rem;
  padding: 1.2rem 1.5rem;
}

.achievements-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.achievements ul {
  padding-left: 1.2rem;
}

.achievements li {
  margin-bottom: 0.4rem;
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.5;
}

.achievements li:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    aspect-ratio: 1.5/1;
  }
}

@media (max-width: 600px) {
  .sidebar {
    width: 60px;
  }
  main {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
  .sidebar nav a span {
    display: none;
  }
  .typewriter {
    font-size: 1.5rem;
  }
}

@media (max-width: 650px) {
  .panel-content {
    padding: 2rem 0.7rem;
  }
  .timeline {
    margin-left: 10px;
    padding-left: 10px;
  }
  .timeline-icon {
    left: -25px;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1rem;
  }
  .timeline-item {
    padding-left: 1.3rem;
  }
  .achievements {
    padding: 0.8rem 0.7rem;
  }
}
