/* --- THEME VARIABLES --- */
:root {
    --void: #08090c;          /* Deep Space Black */
    --void-light: #0f1016;    /* Surface Black */
    --gold: #BFA274;          /* Antique Gold (Contacts) */
    --gold-dim: rgba(191, 162, 116, 0.2);
    --signal: #A5B4FC;        /* Pale Indigo (Radiation/Data) */
    --matter: #E2E2E2;        /* Off-White Text */
    
    --font-serif: 'Cinzel Decorative', serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--void);
    color: var(--matter);
    font-family: var(--font-mono);
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- TYPOGRAPHY GLOBAL --- */
/* UPDATED: Ensures all headings wrap safely on small screens */
h1, h2, h3 { 
    font-family: var(--font-serif); 
    font-weight: 400; 
    color: #fff;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

a { text-decoration: none; color: inherit; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
a:hover { color: var(--gold); text-shadow: 0 0 10px var(--gold-dim); }

.mono-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
    opacity: 0.9;
    margin-bottom: 10px;
    display: block;
}

/* --- BACKGROUND LATTICE --- */
#lattice-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    perspective: 1200px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.12;
}

.lattice-cube {
    position: absolute;
    top: 50%; left: 50%;
    width: 600px; height: 600px;
    transform-style: preserve-3d;
    animation: slowRotate 100s infinite linear;
}

.face { 
    position: absolute; 
    width: 600px; height: 600px; 
    border: 1px solid var(--signal); 
    background: linear-gradient(45deg, transparent 40%, rgba(165, 180, 252, 0.05) 100%);
    transition: all 0.5s ease;
}

.f1 { transform: translateZ(300px); } 
.f2 { transform: rotateY(90deg) translateZ(300px); }
.f3 { transform: rotateY(180deg) translateZ(300px); } 
.f4 { transform: rotateY(-90deg) translateZ(300px); }
.f5 { transform: rotateX(90deg) translateZ(300px); } 
.f6 { transform: rotateX(-90deg) translateZ(300px); }

@keyframes slowRotate {
    from { transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    to { transform: translate(-50%, -50%) rotateX(360deg) rotateY(180deg) rotateZ(45deg); }
}

/* --- LAYOUT --- */
main { max-width: 1100px; margin: 0 auto; padding: 0 40px; }
section { margin-bottom: 160px; }

/* --- HERO HEADER --- */
header {
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--gold-dim);
    position: relative;
    padding: 0 20px;
}

.identity-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 30px var(--gold-dim);
    margin-bottom: 30px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.identity-block h1 { 
    /* Main Name: Scales between 2rem and 5.5rem */
    font-size: clamp(2rem, 6vw, 5.5rem); 
    line-height: 1.2; 
    margin-bottom: 15px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    width: 100%;
}

.identity-block .role {
    font-size: 1rem;
    color: var(--signal);
    letter-spacing: 2px;
    border-left: 2px solid var(--gold);
    padding-left: 15px;
    transition: all 0.5s ease;
    text-align: left;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 0;
    font-size: 0.7rem;
    color: var(--gold);
    opacity: 0.5;
    letter-spacing: 2px;
    animation: bounce 2s infinite;
}
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* --- THESIS SECTION --- */
.thesis-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
}

.thesis-statement { 
    /* Thesis Text: Scales for mobile readability */
    font-size: clamp(1.1rem, 2vw, 1.6rem); 
    line-height: 1.6; 
    color: var(--matter); 
}

.thesis-statement span { 
    color: #fff;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 2px;
}

.bio-data { 
    border-left: 1px solid rgba(165, 180, 252, 0.15); 
    padding-left: 40px; 
}

.data-point { margin-bottom: 35px; }
.data-val { font-size: 1.1rem; color: #fff; display: block; margin-top: 5px; }

/* --- DOMAINS (Cards) --- */
.domain-header { 
    text-align: center; 
    margin-bottom: 100px;
    padding: 0 10px; /* Safety padding */
}

/* UPDATED: Section Headings (Architectures of Detection, etc.) */
.domain-header h2 { 
    /* Scales between 1.8rem and 3rem */
    font-size: clamp(1.8rem, 5vw, 3rem); 
    margin-top: 10px; 
    line-height: 1.2;
}

.domain-card {
    background: linear-gradient(180deg, rgba(15,16,22,0.4), rgba(10,11,16,0.9));
    border: 1px solid var(--gold-dim);
    padding: 60px;
    margin-bottom: 40px;
    position: relative;
    transition: all 0.5s ease;
}

.domain-card:hover { 
    border-color: rgba(191, 162, 116, 0.6); 
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.domain-card::after {
    content: ''; position: absolute; top:0; left:0; width:100%; height:100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.2) 3px);
    pointer-events: none;
}

/* UPDATED: Card Headings (Sustainable Perovskites, etc.) */
.domain-card h3 { 
    /* Scales between 1.5rem and 2.2rem */
    font-size: clamp(1.5rem, 4vw, 2.2rem); 
    margin: 20px 0; 
    color: #fff;
    line-height: 1.3;
}

.domain-meta { display: flex; gap: 15px; margin-top: 30px; flex-wrap: wrap; }

.material-tag { 
    border: 1px solid var(--signal); 
    padding: 8px 16px; 
    font-size: 0.75rem; 
    color: var(--signal); 
    letter-spacing: 1px;
    background: rgba(165, 180, 252, 0.05);
}

/* --- ARTIFACTS (Publications) --- */
.artifact-list { border-top: 1px solid var(--gold-dim); }

.artifact {
    padding: 40px 0;
    border-bottom: 1px solid var(--gold-dim);
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 30px;
    align-items: center;
    transition: background 0.3s;
}

.artifact:hover { background: rgba(191, 162, 116, 0.03); }

.artifact-year { color: var(--gold); font-weight: 700; }
.artifact-title { font-size: 1.2rem; color: #fff; margin-bottom: 5px; }
.artifact-journal { font-size: 0.9rem; color: var(--signal); font-style: italic; }

.artifact-link { 
    font-family: var(--font-mono); 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    color: var(--gold); 
    border: 1px solid var(--gold-dim);
    padding: 10px 20px;
    transition: 0.3s;
}

.artifact-link:hover {
    background: var(--gold);
    color: var(--void);
    font-weight: 700;
}

/* --- FOOTER --- */
footer {
    padding: 120px 0;
    text-align: center;
    border-top: 1px solid var(--gold-dim);
    position: relative;
}

.contact-links { 
    display: flex; 
    justify-content: center; 
    gap: 50px; 
    margin-top: 40px; 
}

.contact-links a { 
    font-family: var(--font-mono); 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    font-size: 0.9rem; 
    border-bottom: 1px solid transparent;
}

.contact-links a:hover { border-bottom-color: var(--gold); }

/* --- MOBILE RESPONSIVENESS (Refined) --- */
@media (max-width: 768px) {
    main { padding: 0 20px; }

    /* Name Resize */
    .identity-block h1 {
        font-size: 2rem; 
        line-height: 1.3;
    }
    
    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .thesis-grid { grid-template-columns: 1fr; gap: 40px; }
    
    .bio-data { 
        border-left: none; 
        padding-left: 0; 
        border-top: 1px solid var(--gold-dim); 
        padding-top: 30px; 
    }
    
    /* Card Padding Reduced for Mobile */
    .domain-card { 
        padding: 30px 20px; 
    }
    
    .artifact { 
        grid-template-columns: 1fr; 
        gap: 15px; 
        text-align: left; 
        align-items: start; 
    }
    
    .artifact-link { 
        display: inline-block; 
        margin-top: 10px; 
        width: fit-content; 
    }
    
    .contact-links { 
        flex-direction: column; 
        gap: 20px; 
    }
}