@import url("https://fonts.googleapis.com/css?family=Poppins");

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

:root {
    --bg-color: #020035;
    --text-color: #cae3ff;
    --highlighted-text: #00fffb;
    --muted-text: #7989ff;
    --accent-color: #c691ff;
    --border-color: #c1a7ff;
    --max-width: 1100px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    display: block;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* =====================
   HEADER
   ===================== */

.header {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-block;
    transition: 0.3s ease;
}

.logo:hover {
    color: yellow;
    transform: translateY(-0.5rem);
}

.navbar a {
    margin-left: 1.5rem;
    font-size: 0.95rem;
    color: var(--muted-text);
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar a.active {
    color: var(--highlighted-text);
    font-weight: 500;
}

.navbar a:hover {
    color: var(--highlighted-text);
    transform: scale(1.1);
}

/* =====================
   HOME PAGE
   ===================== */

.home {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.home-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.home-content h1 span {
    color: var(--accent-color);
}

.home-content h2 {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--muted-text);
    margin-bottom: 1.5rem;
}

.home-content p {
    max-width: 600px;
    margin-bottom: 2rem;
}

.home-links a {
    margin-right: 1.2rem;
    font-size: 0.95rem;
    color: var(--accent-color);
    display: inline-block;
    transition: 0.3s ease;
}

.home-links a:hover {
    color: var(--highlighted-text);
    transform: scale(1.05) translateY(-0.20rem);
}

.home-image {
    width: 450px;
    height: 450px;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
}

.home-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =====================
   FOCUS SECTION
   ===================== */

.focus {
    max-width: var(--max-width);
    margin: 6rem auto;
    padding: 0 2rem;
}

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

.focus-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.focus-item p {
    color: var(--muted-text);
    font-size: 0.95rem;
}

/* =====================
   WRITING SECTION (HOME)
   ===================== */

.writing {
    max-width: var(--max-width);
    margin: 6rem auto;
    padding: 0 2rem;
}

.writing-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.writing-item h3 {
    margin-bottom: 0.4rem;
}

.writing-item p {
    color: var(--muted-text);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.writing-meta {
    font-size: 0.8rem;
    color: var(--muted-text);
}

.writing-item a {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent-color);
    transition: 0.3s ease;
}

.writing-item a:hover {
    transform: scale(1.05);
}

.writing-link {
    margin-top: 2.5rem;
}

.writing-link a {
    color: var(--accent-color);
    font-weight: 500;
    display: inline-block;
    transition: 0.3s ease;
}

.writing-link a:hover {
    color: var(--highlighted-text);
    transform: scale(1.1);
}

/* =====================
   SHARED: PROJECT CARDS
   ===================== */

.projects {
    max-width: var(--max-width);
    margin: 6rem auto;
    padding: 0 2rem;
}

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

.project-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card h3 {
    margin-bottom: 0.6rem;
}

.project-card p {
    font-size: 0.95rem;
    color: var(--muted-text);
    margin-bottom: 1.2rem;
    transition: 0.3s ease;
}

.project-tags {
    font-size: 0.8rem;
    color: var(--muted-text);
    margin-bottom: 1.2rem;
}

.project-card a {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
    transition: 0.3s ease;
}

.project-card a:hover {
    transform: scale(1.05);
}

.projects-link {
    margin-top: 2.5rem;
}

.projects-link a {
    color: var(--accent-color);
    font-weight: 500;
    display: inline-block;
    transition: 0.3s ease;
}

.projects-link a:hover {
    color: var(--highlighted-text);
    transform: scale(1.1);
}

/* =====================
   FOOTER
   ===================== */

.footer {
    max-width: var(--max-width);
    margin: 4rem auto 2rem auto;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    font-size: 0.85rem;
    color: var(--muted-text);
}

.footer-links a {
    margin-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--muted-text);
}

/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 900px) {
    .home {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .home-image {
        order: -1;
    }
}

/* =====================
   PROJECTS PAGE
   ===================== */

.projects-page {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 0 2rem;
}

.projects-header {
    margin-bottom: 3rem;
}

.projects-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.projects-header p {
    max-width: 700px;
    color: var(--muted-text);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.project-meta span {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    background-color: #f3f3f3;
    color: var(--muted-text);
}

/* =====================
   RESEARCH PAGE
   ===================== */

.research-page {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 0 2rem;
}

.research-header {
    margin-bottom: 3rem;
}

.research-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.research-header p {
    max-width: 700px;
    color: var(--muted-text);
}

.research-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.research-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 2rem;
}

.research-card h3 {
    margin-bottom: 0.6rem;
}

.research-card p {
    color: var(--muted-text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.research-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.research-meta span {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    background-color: #f3f3f3;
    color: var(--muted-text);
}

.research-card a {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    transition: 0.3s ease;
}

.research-card a:hover {
    transform: scale(1.1);
}

/* =====================
   ABOUT PAGE
   ===================== */

.about-page {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 0 2rem;
}

.about-header {
    margin-bottom: 2rem;
}

.about-header h1 {
    font-size: 2.5rem;
}

.about-content {
    max-width: 700px;
    margin-bottom: 3rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.about-interests h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.about-interests ul {
    list-style: none;
    padding-left: 0;
}

.about-interests li {
    margin-bottom: 0.6rem;
    color: var(--muted-text);
}

/* =====================
   ENTRY / ARTICLE PAGE
   ===================== */

.entry-page {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.entry-header h1 {
    font-size: 2.6rem;
    margin-bottom: 0.8rem;
}

.entry-subtitle {
    font-size: 1.1rem;
    color: var(--muted-text);
    margin-bottom: 1.2rem;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 3rem;
}

.entry-meta span {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    background-color: #f3f3f3;
    color: var(--muted-text);
}

.entry-hero {
    margin-bottom: 3rem;
}

.entry-hero img {
    width: 100%;
    border-radius: 16px;
}

.entry-content h2 {
    font-size: 1.6rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.2rem;
    color: var(--text-color);
}

.entry-content ul,
.entry-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.entry-links {
    margin-top: 4rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.entry-links a {
    font-size: 0.9rem;
    color: var(--accent-color);
    display: inline-block;
    transition: 0.3s ease;
}

.entry-links a:hover {
    color: var(--highlighted-text);
    transform: scale(1.1);
}

.entry-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--accent-color);
}

.entry-figure {
    margin: 2rem 0;
}

.entry-figure img {
    width: 100%;
    border-radius: 12px;
}

.entry-figure figcaption {
    font-size: 0.8rem;
    color: var(--muted-text);
    margin-top: 0.6rem;
    text-align: center;
    font-style: italic;
}

/* Results table */
article.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

article.entry-content th,
article.entry-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

article.entry-content th {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

article.entry-content tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* =====================
   DNA HELIX
   ===================== */

#dna-container {
    position: fixed;
    left: 10px;
    top: 0;
    height: 100vh;
    width: 80px;
    perspective: 800px;
    pointer-events: none;
}

.dna-helix {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
}

.base-pair {
    position: absolute;
    left: 50%;
    width: 40px;
    height: 4px;
    top: calc(var(--i) * 12px);
    transform-style: preserve-3d;
    opacity: 0.85;
    filter: brightness(1.05);
}

.base-pair::before,
.base-pair::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #f8fafc;
    border-radius: 50%;
    top: -1px;
}

.base-pair::before { left: -6px; }
.base-pair::after  { right: -6px; }

@media (max-width: 1270px) {
    .dna-helix { display: none; }
}