* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Rubik", sans-serif;
    background: #0a1a2f;
    color: #d8dfed;
    line-height: 1.6;
}
html {
    scroll-behavior: smooth;
}
.container {
    max-width: 1200px;  
    margin: 0 auto;     
    padding: 0 20px;    
}
main {
    padding-top: 90px;
}

header {
    padding: 20px 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #0a1a2f;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
a {
    text-decoration: none;
    color: #d8dfed;
}
section {
    padding: 100px 0px;
}
h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}
nav {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 0 20px; */
}
/* icon links wrapper */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* tooltip label */
.nav-link::after {
    content: attr(data-label);
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #0a1a2f;
    color: #d8dfed;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    border: 1px solid #233554;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

/* show on hover */
.nav-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* optional: icon highlight */
.nav-link:hover svg {
    color: #64ffda;
}

nav a:hover {
    color: #64ffda;
    transition: color 0.3s;
}
.nav-name:hover {
    color: #d8dfed;
}

.nav-left,
.nav-center {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1px;
}
.nav-name {
    font-size: 20px;
}
nav a {
    margin-left: 20px;
    font-size: 15px; 
    font-weight: 500;
}
.nav-right svg {
    width: 22px;
    height: 22px;
    fill: #d8dfed;
    transition: fill 0.3s;
}
.nav-right a:hover svg {
    fill: #64ffda;
}
.nav-left a:first-child {
    margin-left: 0;
}
.nav-right a:first-child {
    margin-left: 0;
}
#intro * {
    text-align: left;
}

#intro {
    min-height: auto;
    display: block;
    position: relative;
    overflow: hidden;
    /* padding: 20px 0; */
}


.intro-inner {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: center;
    gap: 60px;
}

.intro-text {
    max-width: 650px;
}

.intro-name {
    font-size: 3.5rem;
    font-weight: 600;
    color: #64ffda;
    margin-right: 6px;
}
.intro-title {
    font-size: 3.5rem;
    font-weight: 500;
    margin-right: 6px;
}
.intro-title,
.intro-name {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    line-height: 1.5;
}

.intro-subtitle {
    font-size: 1.5rem;
    color: #d8dfedb0;
    margin-top: 10px;
    text-align: left;
}
#intro p {
    margin-bottom: 8px;
}
.intro-desc {
    max-width: 700px;
    margin-top: 30px;
    color: #d8dfedb0;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: left;
}
.intro-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 45px;
    padding: 17px 35px;
    border: 1px solid #64ffda;
    color: #64ffda;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s;
}

.intro-contact:hover {
    background: #112240;
    color: #64ffda;
}
.intro-contact svg {
    width: 28px;
    height: 21px;
    fill: #64ffda;
    transition: fill 0.3s;
}

.intro-contact:hover svg {
    fill: #64ffda;
}
.cursor-blinking {
    display: inline-block;
    width: 6px;
    height: 3.5rem;
    background: #64ffda;
    border-radius: 3px;
    animation: fadeCursor 1s infinite ease-in-out;
    transform: translateY(10px);
}
@keyframes fadeCursor {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

section {
    scroll-margin-top: 30px;
}

.section-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 500;
    color: #d8dfed;
}
.section-header::after {
    content: "";
    height: 1px;
    opacity: 0.2;
    width: 250px;
    margin-bottom: 15px;
    background: #d8dfedb0;
}
#about {
    max-width: 1500px;
    margin: 0 auto;
    padding-top: 50px;
}
.about-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 50px;
}
.about-img img {
    width: 300px;
    height: auto;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
}
.about-img img:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}
.about-content p {
    font-size: 1.1rem;
    margin-bottom: 18px;
    line-height: 2;
    color: #d8dfedb0;
    margin-top: 1px;
    text-align: left;
    max-width: 600px;
}
#skills {
    max-width: 1500px;
    margin: 0 auto;
    padding-top: 50px;
}

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

.skill-group h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #d8dfed;
}

.skill-group ul {
    list-style: none;
    display: grid;
    gap: 12px;
}

.skill-group li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #112240;
    color: #d8dfedb0;
    /* border: 1px solid #233554; */
    border-radius: 6px;
    font-size: 0.95rem;
    transition: transform 0.25s, border-color 0.25s;
}

.skill-group li i {
    color: #64ffda;
    width: 18px;
    text-align: center;
}

.skill-group li:hover {
    transform: translateY(-4px);
    border: 1px solid #64ffda;
}


#certs {
    max-width: 1500px;
    margin: 0 auto;
    padding-top: 50px;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.cert-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cert-card {
    background: #112240;
    border-radius: 8px;
    padding: 20px;
    padding-bottom: 80px;
    padding-right: 36px;
    height: 230px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.25s, border-color 0.25s;
}

.cert-card:hover {
    transform: translateY(-6px);
    border: 1px solid #64ffda;
}

.cert-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #d8dfed;
}

.cert-issuer {
    position: absolute;
    bottom: 64px;
    left: 20px;
    font-size: 0.9rem;
    color: #d8dfedb0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cert-issuer i {
    color: #d8dfed;
    font-size: 1.1rem;
    width: 18px;
}

/* external link icon */
.cert-link {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.9rem;
    color: #d8dfed;
    opacity: 0.85;
}

.cert-card:hover .cert-link {
    color: #64ffda;
    opacity: 1;
}

/* status badge */
.cert-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 500;
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 0.75rem;
    line-height: 1;
}

.cert-status.completed {
    color: #64ffda;
    border: 1px solid #64ffda;
}

.cert-status.in-progress {
    color: #ffd166;
    border: 1px solid #ffd166;
}

/* projects */
#projects {
    max-width: 1500px;
    margin: 0 auto;
    padding-top: 50px;
}

.project-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: flex-start;
}

.project-img img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.project-featured {
    background: #112240;
    /* border: 1px solid #233554; */
    border-radius: 12px;
    padding: 32px;
    max-width: 900px;
    margin: 0 auto;
    transition: transform 0.25s, border-color 0.25s;
}

.project-featured:hover {
    transform: translateY(-6px);
    /* border-color: #64ffda; */
    border: 1px solid #64ffda;
}

.project-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #d8dfed;
    padding-right: 60px;
}

.project-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #d8dfedb0;
    margin-bottom: 20px;
    max-width: 700px;
}

.project-meta {
    margin-bottom: 26px;
    padding-top: 6px;
}

.project-stack {
    font-size: 0.9rem;
    color: #9fb3cc;
    letter-spacing: 0.2px;
}

/* actions */
.project-content {
    display: flex;
    flex-direction: column;
}
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-title {
    margin-bottom: 0;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    /* border: 1px solid #64ffda; */
    color: #64ffda;
    transition: background 0.25s, transform 0.25s;
}

.project-link svg {
    width: 22px;
    height: 22px;
    fill: #d8dfed;
    transition: fill 0.3s;
    
}

.project-link:hover {
    transform: translateY(-2px);
}

.project-link:hover svg {
    fill: #64ffda;
    transform: scale(1.05);
}

/* responsive */
@media (max-width: 600px) {
    .project-featured {
        padding: 24px;
    }

    .project-title {
        font-size: 1.35rem;
    }
}

#credits {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}
.credits-wrapper {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.credit-content {
    font-size: 14px;
    color: #d8dfedb0;
}


/* fade-in animation */
/* .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
} */

/* .footer-animation {
    display: flex;
    justify-content: center;
    margin: 120px 0 60px;
    opacity: 0.7;
}

.footer-animation img {
    filter: grayscale(100%);
} */

/* .footer-live {
    display: flex;
    justify-content: center;
    margin: 120px 0 60px;
    opacity: 0.5;
}

.ambient-rotate {
    stroke: #d8dfed;
    fill: none;
    stroke-width: 1;
    animation: slowSpin 40s linear infinite;
}

@keyframes slowSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
} */

.hero-drawing {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    pointer-events: none;
    opacity: 0.35;
}

.network-svg {
    width: 420px;
    height: 520px;
    max-width: 100%;
}


.network-svg line {
    stroke: #d8dfed;
    stroke-width: 0.6;
}

.network-svg circle {
    fill: #d8dfed;
}

@media (max-width: 900px) {
    .intro-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-drawing {
        justify-content: center;
        opacity: 0.25;
    }

    .network-svg {
        width: 300px;
        height: auto;
    }
}

/* mobile */

@media (max-width: 768px) {
    .nav-center {
        display: none;
    }
}
@media (max-width: 768px) {
    header {
        padding: 14px 18px;
    }

    nav {
        align-items: center;
    }

    .nav-name {
        font-size: 16px;
        white-space: nowrap;
    }
}
@media (hover: none) {
    .nav-link::after {
        display: none;
    }
}
@media (max-width: 768px) {
    main {
        padding-top: 70px;
    }
}

@media (max-width: 768px) {
    #intro p {
        margin-bottom: 12px;
    }
}
@media (max-width: 768px) {
    .cursor-blinking {
        height: 2.2rem;
        width: 4px;
        transform: translateY(6px);
    }
}
@media (max-width: 768px) {
    .intro-subtitle {
        font-size: 1.05rem;
        line-height: 1.6;
        margin-top: 8px;
    }
}
@media (max-width: 768px) {
    .intro-desc {
        font-size: 1rem;
        line-height: 1.7;
        margin-top: 20px;
    }
}
@media (max-width: 768px) {
    .intro-contact {
        margin-top: 28px;
        padding: 14px 26px;
        font-size: 1rem;
    }
}
@media (max-width: 768px) {
    .hero-drawing {
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        justify-content: center;
        opacity: 0.15;
        pointer-events: none;
    }
}
@media (max-width: 768px) {
    .network-svg {
        width: 260px;
        height: auto;
    }
}
@media (max-width: 768px) {
    .about-wrapper {
        display: block;
    }

    .about-img {
        float: right;
        width: 140px;
        margin: -12px 0 14px 16px;
    }

    .about-img img {
        width: 100%;
        border-radius: 12px;
    }
}
@media (max-width: 768px) {
    .about-content p:first-child {
        margin-top: 0;
    }
}
@media (max-width: 768px) {
    .about-content {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .about-content p {
        font-size: 1rem;
        line-height: 1.75;
        margin-bottom: 14px;
    }
}


@media (max-width: 768px) {
    .about-content {
        max-width: 100%;
    }

    .about-content p {
        font-size: 1rem;
        line-height: 1.75;
        margin-bottom: 16px;
    }
}
@media (max-width: 768px) {
    #about {
        padding-top: 30px;
    }
}
@media (max-width: 768px) {
    .about-img {
        display: none;
    }

    .about-wrapper {
        display: block;
    }

    .about-content {
        max-width: 100%;
    }

    .about-content p {
        max-width: 100%;
    }
}


@media (max-width: 768px) {
    .section-title {
        font-size: 1.9rem;
        line-height: 1.2;
        white-space: nowrap;
    }
}
@media (max-width: 768px) {
    .section-header::after {
        width: 120px;
        margin-bottom: 8px;
    }
}
@media (max-width: 768px) {
    section {
        padding: 70px 0;
    }
}

@media (max-width: 768px) {
    .skills-content {
        gap: 20px;
        margin-top: 20px;
    }

    .skill-group ul {
        gap: 10px;
    }
}
@media (max-width: 768px) {
    .skill-group li {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
}
@media (max-width: 768px) {
    .skill-group h3 {
        font-size: 1rem;
        margin-bottom: 10px;
        letter-spacing: 0.3px;
    }
}
@media (max-width: 600px) {
    .skills-content {
        grid-template-columns: 1fr;
    }
}
@media (hover: none) {
    .skill-group li:active {
        transform: scale(0.98);
    }
}
@media (max-width: 768px) {
    .certs-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .cert-card {
        height: 190px;
        padding: 18px;
        padding-right: 30px;
    }

    .cert-card h3 {
        font-size: 1.05rem;
        line-height: 1.35;
        margin-bottom: 28px;
    }

    .cert-issuer {
        bottom: 52px;
        font-size: 0.85rem;
    }

    .cert-status {
        bottom: 16px;
        font-size: 0.7rem;
    }

    .cert-link {
        top: 16px;
        right: 16px;
    }

    .cert-card:active {
        transform: scale(0.97);
    }
}
@media (max-width: 768px) {
    .project-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .project-content {
        order: 1;
    }

    .project-img {
        order: 2;
        margin-top: 4px; /* reduced space above image */
    }

    .project-img img {
        width: 65%;
        max-width: 240px;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .project-desc {
        font-size: 0.95rem;
    }
}


/* narrow desktop / split screen — force mobile intro layout */
@media (max-width: 1150px) {
    .intro-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-drawing {
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        justify-content: center;
        opacity: 0.15;
        pointer-events: none;
    }

    .network-svg {
        width: 300px;
        height: auto;
    }

    .intro-text {
        max-width: 100%;
    }
}
